#
PKG_MAJOR=2
PKG_MINOR=6
-PKG_REVISION=15
+PKG_REVISION=16
PKG_BUILD=1
# MSGFMT MSGMERGE RPM
#
AC_DEFUN([AC_PACKAGE_UTILITIES],
- [ if test -z "$CC"; then
- AC_PROG_CC
- fi
+ [ AC_PROG_CC
cc="$CC"
AC_SUBST(cc)
AC_PACKAGE_NEED_UTILITY($1, "$cc", cc, [C compiler])
if test -z "$MAKE"; then
- AC_PATH_PROG(MAKE, make, /usr/bin/make)
+ AC_PATH_PROG(MAKE, gmake,, /usr/bin:/usr/freeware/bin)
+ fi
+ if test -z "$MAKE"; then
+ AC_PATH_PROG(MAKE, make,, /usr/bin)
fi
make=$MAKE
AC_SUBST(make)
AC_PACKAGE_NEED_UTILITY($1, "$make", make, [GNU make])
if test -z "$LIBTOOL"; then
- AC_PATH_PROG(LIBTOOL, libtool,,/usr/bin:/usr/local/bin)
+ AC_PATH_PROG(LIBTOOL, glibtool,, /usr/bin)
+ fi
+ if test -z "$LIBTOOL"; then
+ AC_PATH_PROG(LIBTOOL, libtool,, /usr/bin:/usr/local/bin:/usr/freeware/bin)
fi
libtool=$LIBTOOL
AC_SUBST(libtool)
AC_PACKAGE_NEED_UTILITY($1, "$libtool", libtool, [GNU libtool])
if test -z "$TAR"; then
- AC_PATH_PROG(TAR, tar)
+ AC_PATH_PROG(TAR, tar,, /usr/freeware/bin:/bin:/usr/local/bin:/usr/bin)
fi
tar=$TAR
AC_SUBST(tar)
if test -z "$ZIP"; then
- AC_PATH_PROG(ZIP, gzip, /bin/gzip)
+ AC_PATH_PROG(ZIP, gzip,, /bin:/usr/local/bin:/usr/freeware/bin)
fi
+
zip=$ZIP
AC_SUBST(zip)
+
if test -z "$MAKEDEPEND"; then
AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true)
fi
makedepend=$MAKEDEPEND
AC_SUBST(makedepend)
+
if test -z "$AWK"; then
- AC_PATH_PROG(AWK, awk, /bin/awk)
+ AC_PATH_PROG(AWK, awk,, /bin:/usr/bin)
fi
awk=$AWK
AC_SUBST(awk)
+
if test -z "$SED"; then
- AC_PATH_PROG(SED, sed, /bin/sed)
+ AC_PATH_PROG(SED, sed,, /bin:/usr/bin)
fi
sed=$SED
AC_SUBST(sed)
+
if test -z "$ECHO"; then
- AC_PATH_PROG(ECHO, echo, /bin/echo)
+ AC_PATH_PROG(ECHO, echo,, /bin:/usr/bin)
fi
echo=$ECHO
AC_SUBST(echo)
+
if test -z "$SORT"; then
- AC_PATH_PROG(SORT, sort, /bin/sort)
+ AC_PATH_PROG(SORT, sort,, /bin:/usr/bin)
fi
sort=$SORT
AC_SUBST(sort)
if test "$enable_gettext" = yes; then
if test -z "$MSGFMT"; then
- AC_CHECK_PROG(MSGFMT, msgfmt, /usr/bin/msgfmt)
+ AC_PATH_PROG(MSGFMT, msgfmt,, /usr/bin:/usr/freeware/bin)
fi
msgfmt=$MSGFMT
AC_SUBST(msgfmt)
AC_PACKAGE_NEED_UTILITY($1, "$msgfmt", msgfmt, gettext)
+
if test -z "$MSGMERGE"; then
- AC_CHECK_PROG(MSGMERGE, msgmerge, /usr/bin/msgmerge)
+ AC_PATH_PROG(MSGMERGE, msgmerge,, /usr/bin:/usr/freeware/bin)
fi
msgmerge=$MSGMERGE
AC_SUBST(msgmerge)
fi
if test -z "$RPM"; then
- AC_PATH_PROG(RPM, rpm, /bin/rpm)
+ AC_PATH_PROG(RPM, rpm,, /bin:/usr/freeware/bin)
fi
rpm=$RPM
AC_SUBST(rpm)
+
dnl .. and what version is rpm
rpm_version=0
test -x $RPM && rpm_version=`$RPM --version \
])
AC_DEFUN([AC_PACKAGE_NEED_UUID_H],
- [ AC_CHECK_HEADERS(uuid.h)
- if test $ac_cv_header_uuid_h = no; then
- AC_CHECK_HEADERS(uuid/uuid.h,, [
+ [ AC_CHECK_HEADERS([uuid.h sys/uuid.h uuid/uuid.h])
+ if test $ac_cv_header_uuid_h = no -a \
+ $ac_cv_header_sys_uuid_h = no -a \
+ $ac_cv_header_uuid_uuid_h = no; then
echo
echo 'FATAL ERROR: could not find a valid UUID header.'
echo 'Install the Universally Unique Identifiers development package.'
- exit 1])
+ exit 1
fi
])
/*
- * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2001,2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
dbprintf(" arguments\n");
return 0;
}
- optind = 0;
+ platform_getoptreset();
return ct->cfunc(argc, argv);
}
+xfsprogs (2.6.16-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Nathan Scott <nathans@debian.org> Thu, 17 Jun 2004 15:16:25 +1000
+
xfsprogs (2.6.15-1) unstable; urgency=low
* New upstream release.
+xfsprogs-2.6.16 (17 June 2004)
+ - Add sendfile command into xfs_io(8) to exercise that
+ functionality.
+ - Remove maxtrres program that was used in the build
+ to generate a header for mkfs' consumption.
+ - This allows cross-compiles to be greatly simplified.
+ - Portability tweaks for building on other platforms.
+ - Fix obscure bug in log size lower boundary checks for
+ auto-sized logs when stripe alignment is in effect;
+ the enforced lower bound could have been set too low.
+
xfsprogs-2.6.15 (09 June 2004)
- Make xfs_check test for a dirty log before proceeding to
check the filesystem.
xfs_log.h xfs_log_priv.h xfs_log_recover.h xfs_mount.h xfs_quota.h \
xfs_rtalloc.h xfs_sb.h xfs_trans.h xfs_trans_space.h xfs_types.h
+HFILES += $(PKG_PLATFORM).c
+PHFILES = darwin.h freebsd.h irix.h linux.h
DKHFILES = volume.h fstyp.h dvh.h
-LSRCFILES = platform_defs.h.in builddefs.in buildmacros buildrules $(DKHFILES)
+LSRCFILES = $(shell echo $(PHFILES) | sed -e "s/$(PKG_PLATFORM).c//g")
+LSRCFILES += platform_defs.h.in builddefs.in buildmacros buildrules $(DKHFILES)
LDIRT = xfs disk
default install :
--- /dev/null
+/*
+ * Copyright (c) 2004 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Further, this software is distributed without any warranty that it is
+ * free of the rightful claim of any third person regarding infringement
+ * or the like. Any license provided herein, whether implied or
+ * otherwise, applies only to this software file. Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write the Free Software Foundation, Inc., 59
+ * Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
+ * Mountain View, CA 94043, or:
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
+ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+ *
+ */
+#ifndef __XFS_DARWIN_H__
+#define __XFS_DARWIN_H__
+
+#include <uuid/uuid.h>
+#include <libgen.h>
+#include <sys/vm.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/mount.h>
+
+#include <sys/syscall.h>
+# ifndef SYS_fsctl
+# define SYS_fsctl 242
+# endif
+static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
+{
+ return syscall(SYS_fsctl, path, cmd, p, 0);
+}
+
+static __inline__ int platform_test_xfs_fd(int fd)
+{
+ struct statfs buf;
+ if (fstatfs(fd, &buf) < 0)
+ return 0;
+ return (strcmp(buf.f_fstypename, "xfs") == 0);
+}
+
+static __inline__ int platform_test_xfs_path(const char *path)
+{
+ struct statfs buf;
+ if (statfs(path, &buf) < 0)
+ return 0;
+ return (strcmp(buf.f_fstypename, "xfs") == 0);
+}
+
+static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
+{
+ return fstatfs(fd, buf);
+}
+
+static __inline__ void platform_getoptreset(void)
+{
+ extern int optreset;
+ optreset = 0;
+}
+
+#define __int8_t int8_t
+#define __int16_t int16_t
+#define __int32_t int32_t
+#define __int32_t int32_t
+#define __int64_t int64_t
+#define __uint8_t u_int8_t
+#define __uint16_t u_int16_t
+#define __uint32_t u_int32_t
+#define __uint64_t u_int64_t
+#define __s8 int8_t
+#define __s16 int16_t
+#define __s32 int32_t
+#define __s64 int64_t
+#define __u8 u_int8_t
+#define __u16 u_int16_t
+#define __u32 u_int32_t
+#define __u64 u_int64_t
+#define loff_t off_t
+#define off64_t off_t
+
+typedef off_t xfs_off_t;
+typedef u_int64_t xfs_ino_t;
+typedef u_int32_t xfs_dev_t;
+typedef int64_t xfs_daddr_t;
+typedef char* xfs_caddr_t;
+
+typedef unsigned char uchar_t;
+#define stat64 stat
+#define fstat64 fstat
+#define lseek64 lseek
+#define pread64 pread
+#define pwrite64 pwrite
+#define ftruncate64 ftruncate
+#define fdatasync fsync
+#define memalign(a,sz) valloc(sz)
+
+#include <machine/endian.h>
+#define __BYTE_ORDER BYTE_ORDER
+#define __BIG_ENDIAN BIG_ENDIAN
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#include <xfs/swab.h>
+
+#define O_LARGEFILE 0
+#ifndef O_DIRECT
+#define O_DIRECT 0
+#endif
+#ifndef O_SYNC
+#define O_SYNC 0
+#endif
+
+#define B_FALSE 0
+#define B_TRUE 1
+
+#define ENOATTR 989 /* Attribute not found */
+#define EFSCORRUPTED 990 /* Filesystem is corrupted */
+#define constpp char * const *
+
+#define HAVE_FID 1
+
+#endif /* __XFS_DARWIN_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2004 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Further, this software is distributed without any warranty that it is
+ * free of the rightful claim of any third person regarding infringement
+ * or the like. Any license provided herein, whether implied or
+ * otherwise, applies only to this software file. Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write the Free Software Foundation, Inc., 59
+ * Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
+ * Mountain View, CA 94043, or:
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
+ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+ *
+ */
+#ifndef __XFS_FREEBSD_H__
+#define __XFS_FREEBSD_H__
+
+#include <sys/stat.h>
+#include <sys/param.h>
+#include <sys/ioccom.h>
+#include <sys/mount.h>
+#include <ctype.h>
+#include <libgen.h>
+#include <paths.h>
+#include <uuid.h>
+
+#include <machine/endian.h>
+
+/* FreeBSD file API is 64-bit aware */
+#define fstat64 fstat
+#define ftruncate64 ftruncate
+#define lseek64 lseek
+#define stat64 stat
+#define pwrite64 pwrite
+#define pread64 pread
+#define fdatasync fsync
+#define memalign(a,size) valloc(size)
+
+typedef u_int8_t __u8;
+typedef int8_t __s8;
+typedef u_int16_t __u16;
+typedef int16_t __s16;
+typedef u_int32_t __u32;
+typedef int32_t __s32;
+typedef u_int64_t __u64;
+typedef int64_t __s64;
+
+#define constpp char * const *
+
+#define EFSCORRUPTED 990 /* Filesystem is corrupted */
+
+typedef off_t xfs_off_t;
+typedef off_t off64_t;
+typedef __uint64_t xfs_ino_t;
+typedef __uint32_t xfs_dev_t;
+typedef __int64_t xfs_daddr_t;
+typedef char* xfs_caddr_t;
+typedef off_t loff_t;
+
+#ifndef _UCHAR_T_DEFINED
+typedef unsigned char uchar_t;
+#define _UCHAR_T_DEFINED 1
+#endif
+typedef enum { B_FALSE,B_TRUE } boolean_t;
+
+#define O_LARGEFILE 0
+
+#define HAVE_FID 1
+#define HAVE_SWABMACROS 1
+#define INT_SWAP16(type,var) ((typeof(type))(__bswap16((__u16)(var))))
+#define INT_SWAP32(type,var) ((typeof(type))(__bswap32((__u32)(var))))
+#define INT_SWAP64(type,var) ((typeof(type))(__bswap64((__u64)(var))))
+
+static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
+{
+ return ioctl(fd, cmd, p);
+}
+
+static __inline__ int platform_test_xfs_fd(int fd)
+{
+ struct statfs buf;
+ if (fstatfs(fd, &buf) < 0)
+ return 0;
+ return strcpy(buf.f_fstypename, "xfs") == 0;
+}
+
+static __inline__ int platform_test_xfs_path(const char *path)
+{
+ struct statfs buf;
+ if (statfs(path, &buf) < 0)
+ return 0;
+ return strcpy(buf.f_fstypename, "xfs") == 0;
+}
+
+static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
+{
+ return fstatfs(fd, buf);
+}
+
+static __inline__ void platform_getoptreset(void)
+{
+ extern int optind;
+ optind = 0;
+}
+
+/*
+ * Implement Linux libuuid functions in terms of DEC DCE's uuid
+ * functions from FreeBSD libc.
+ */
+
+static __inline__ int gnu_uuid_compare(uuid_t a, uuid_t b)
+{
+ return uuid_compare(&a, &b, NULL);
+}
+#define uuid_compare gnu_uuid_compare
+
+static __inline__ int uuid_is_null(uuid_t uid)
+{
+ return uuid_is_nil(&uid, NULL);
+}
+
+static __inline__ void uuid_unparse(uuid_t uid, char *buf)
+{
+ uint32_t status;
+ char *str;
+ uuid_to_string(&uid, &str, &status);
+ if (status == uuid_s_ok)
+ strcpy(buf, str);
+ else *buf = '\0';
+ free(str);
+}
+
+static __inline__ int gnu_uuid_parse(const char *buf, uuid_t *uid)
+{
+ uint32_t status;
+ uuid_from_string(buf, uid, &status);
+ return (status == uuid_s_ok);
+}
+#define uuid_parse(s,u) gnu_uuid_parse((s), &(u))
+
+#define uuid_generate(uid) uuid_create(&(uid), NULL)
+#define uuid_clear(uid) uuid_create_nil(&(uid), NULL)
+#define uuid_copy(dst, src) memcpy(&(dst), &(src), sizeof(uuid_t))
+
+#endif /* __XFS_FREEBSD_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Further, this software is distributed without any warranty that it is
+ * free of the rightful claim of any third person regarding infringement
+ * or the like. Any license provided herein, whether implied or
+ * otherwise, applies only to this software file. Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write the Free Software Foundation, Inc., 59
+ * Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
+ * Mountain View, CA 94043, or:
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
+ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+ *
+ */
+#ifndef __XFS_IRIX_H__
+#define __XFS_IRIX_H__
+
+#include <libgen.h>
+#include <values.h>
+#include <strings.h>
+#include <inttypes.h>
+#include <sys/stat.h>
+#include <sys/uuid.h>
+#include <sys/param.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/statfs.h>
+#include <sys/statvfs.h>
+#include <sys/syssgi.h>
+#include <sys/sysmacros.h>
+#include <sys/fs/xfs_fsops.h>
+//#include <sys/fs/xfs_itable.h>
+
+#define __s8 char
+#define __s16 short
+#define __s32 __int32_t
+#define __s64 __int64_t
+#define __u8 unsigned char
+#define __u16 unsigned short
+#define __u32 __int32_t
+#define __u64 __int64_t
+#define __int8_t char
+#define __int16_t short
+#define __uint8_t unsigned char
+#define __uint16_t unsigned short
+#define loff_t off64_t
+typedef off64_t xfs_off_t;
+typedef __int64_t xfs_ino_t;
+typedef __int32_t xfs_dev_t;
+typedef __int64_t xfs_daddr_t;
+typedef char* xfs_caddr_t;
+typedef flock64_t xfs_flock64_t;
+
+#include <sys/endian.h>
+#define __BYTE_ORDER BYTE_ORDER
+#define __BIG_ENDIAN BIG_ENDIAN
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#include <xfs/swab.h>
+
+#define INT_MAX INT32_MAX
+#define UINT_MAX UINT32_MAX
+#define PATH_MAX MAXPATHLEN
+#define constpp char * const *
+#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
+
+static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
+{
+ if (cmd >= 0 && cmd < XFS_FSOPS_COUNT)
+ return syssgi(SGI_XFS_FSOPERATIONS, fd, cmd, (void *)0, p);
+ return fcntl(fd, cmd, p);
+}
+
+static __inline__ int platform_test_xfs_fd(int fd)
+{
+ struct statvfs sbuf;
+ if (fstatvfs(fd, &sbuf) < 0)
+ return 0;
+ return (strcmp(sbuf.f_basetype, "xfs") == 0);
+}
+
+static __inline__ int platform_test_xfs_path(const char *path)
+{
+ struct statvfs sbuf;
+ if (statvfs(path, &sbuf) < 0)
+ return 0;
+ return (strcmp(sbuf.f_basetype, "xfs") == 0);
+}
+
+static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
+{
+ return fstatfs(fd, buf, sizeof(struct statfs), 0);
+}
+
+static __inline__ void platform_getoptreset(void)
+{
+ getoptreset();
+}
+
+static __inline__ char * strsep(char **s, const char *ct)
+{
+ char *sbegin = *s, *end;
+
+ if (!sbegin)
+ return NULL;
+ end = strpbrk(sbegin, ct);
+ if (end)
+ *end++ = '\0';
+ *s = end;
+ return sbegin;
+}
+
+#define HAVE_DIOATTR 1
+#define HAVE_FSXATTR 1
+#define HAVE_GETBMAP 1
+#define HAVE_GETBMAPX 1
+#define HAVE_FSDMIDATA 1
+#define HAVE_FID 1
+#define HAVE_IOCMACROS 1
+#define HAVE_BBMACROS 1
+
+#define __XFS_FS_H__
+
+#define XFS_IOC_DIOINFO F_DIOINFO
+#define XFS_IOC_FSGETXATTR F_FSGETXATTR
+#define XFS_IOC_FSSETXATTR F_FSSETXATTR
+#define XFS_IOC_ALLOCSP64 F_ALLOCSP64
+#define XFS_IOC_FREESP64 F_FREESP64
+#define XFS_IOC_GETBMAP F_GETBMAP
+#define XFS_IOC_FSSETDM F_FSSETDM
+#define XFS_IOC_RESVSP64 F_RESVSP64
+#define XFS_IOC_UNRESVSP64 F_UNRESVSP64
+#define XFS_IOC_GETBMAPA F_GETBMAPA
+#define XFS_IOC_FSGETXATTRA F_FSGETXATTRA
+#define XFS_IOC_GETBMAPX F_GETBMAPX
+
+#define XFS_IOC_FSGEOMETRY_V1 XFS_FS_GEOMETRY
+#define XFS_IOC_FSBULKSTAT /* TODO */
+#define XFS_IOC_FSBULKSTAT_SINGLE /* TODO */
+#define XFS_IOC_FSINUMBERS /* TODO */
+#define XFS_IOC_PATH_TO_FSHANDLE /* TODO */
+#define XFS_IOC_PATH_TO_HANDLE /* TODO */
+#define XFS_IOC_FD_TO_HANDLE /* TODO */
+#define XFS_IOC_OPEN_BY_HANDLE /* TODO */
+#define XFS_IOC_READLINK_BY_HANDLE /* TODO */
+#define XFS_IOC_SWAPEXT /* TODO */
+#define XFS_IOC_FSGROWFSDATA XFS_GROWFS_DATA
+#define XFS_IOC_FSGROWFSLOG XFS_GROWFS_LOG
+#define XFS_IOC_FSGROWFSRT XFS_GROWFS_RT
+#define XFS_IOC_FSCOUNTS XFS_FS_COUNTS
+#define XFS_IOC_SET_RESBLKS XFS_SET_RESBLKS
+#define XFS_IOC_GET_RESBLKS XFS_GET_RESBLKS
+#define XFS_IOC_ERROR_INJECTION /* TODO */
+#define XFS_IOC_ERROR_CLEARALL /* TODO */
+#define XFS_IOC_FREEZE XFS_FS_FREEZE
+#define XFS_IOC_THAW XFS_FS_THAW
+#define XFS_IOC_FSSETDM_BY_HANDLE /* TODO */
+#define XFS_IOC_ATTRLIST_BY_HANDLE /* TODO */
+#define XFS_IOC_ATTRMULTI_BY_HANDLE /* TODO */
+#define XFS_IOC_FSGEOMETRY XFS_FS_GEOMETRY
+#define XFS_IOC_GOINGDOWN XFS_FS_GOINGDOWN
+
+#define XFS_XFLAG_REALTIME 0x00000001 /* data in realtime volume */
+#define XFS_XFLAG_PREALLOC 0x00000002 /* preallocated file extents */
+#define XFS_XFLAG_IMMUTABLE 0x00000008 /* file cannot be modified */
+#define XFS_XFLAG_APPEND 0x00000010 /* all writes append */
+#define XFS_XFLAG_SYNC 0x00000020 /* all writes synchronous */
+#define XFS_XFLAG_NOATIME 0x00000040 /* do not update access time */
+#define XFS_XFLAG_NODUMP 0x00000080 /* do not include in backups */
+#define XFS_XFLAG_RTINHERIT 0x00000100 /* new files have rt bit set */
+#define XFS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */
+
+
+#endif /* __XFS_IRIX_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2004 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Further, this software is distributed without any warranty that it is
+ * free of the rightful claim of any third person regarding infringement
+ * or the like. Any license provided herein, whether implied or
+ * otherwise, applies only to this software file. Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write the Free Software Foundation, Inc., 59
+ * Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
+ * Mountain View, CA 94043, or:
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
+ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+ *
+ */
+#ifndef __XFS_LINUX_H__
+#define __XFS_LINUX_H__
+
+#include <uuid/uuid.h>
+#include <sys/vfs.h>
+#include <sys/ioctl.h>
+#include <sys/param.h>
+#include <linux/types.h>
+#include <malloc.h>
+#include <getopt.h>
+#include <endian.h>
+#include <xfs/swab.h>
+
+static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
+{
+ return ioctl(fd, cmd, p);
+}
+
+static __inline__ int platform_test_xfs_fd(int fd)
+{
+ struct statfs buf;
+ if (fstatfs(fd, &buf) < 0)
+ return 0;
+ return (buf.f_type == 0x58465342); /* XFSB */
+}
+
+static __inline__ int platform_test_xfs_path(const char *path)
+{
+ struct statfs buf;
+ if (statfs(path, &buf) < 0)
+ return 0;
+ return (buf.f_type == 0x58465342); /* XFSB */
+}
+
+static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
+{
+ return fstatfs(fd, buf);
+}
+
+static __inline__ void platform_getoptreset(void)
+{
+ extern int optind;
+ optind = 0;
+}
+
+#ifndef O_DIRECT
+# if defined (__powerpc__)
+# define O_DIRECT 0400000
+# elif defined (__sparc__)
+# define O_DIRECT 0x100000
+# endif
+#endif
+
+#if (__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ <= 1))
+# define constpp const char * const *
+#else
+# define constpp char * const *
+#endif
+
+#define ENOATTR ENODATA /* Attribute not found */
+#define EFSCORRUPTED 990 /* Filesystem is corrupted */
+
+typedef loff_t xfs_off_t;
+typedef __uint64_t xfs_ino_t;
+typedef __uint32_t xfs_dev_t;
+typedef __int64_t xfs_daddr_t;
+typedef char* xfs_caddr_t;
+
+#ifndef _UCHAR_T_DEFINED
+typedef unsigned char uchar_t;
+#define _UCHAR_T_DEFINED 1
+#endif
+
+#ifndef _BOOLEAN_T_DEFINED
+typedef enum {B_FALSE, B_TRUE} boolean_t;
+#define _BOOLEAN_T_DEFINED 1
+#endif
+
+#endif /* __XFS_IRIX_H__ */
/*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
#if defined(__linux__)
-
-#include <uuid/uuid.h>
-#include <sys/vfs.h>
-#include <sys/ioctl.h>
-#include <sys/param.h>
-#include <linux/types.h>
-#include <malloc.h>
-#include <getopt.h>
-#include <endian.h>
-#include <xfs/swab.h>
-
-static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
-{
- return ioctl(fd, cmd, p);
-}
-
-static __inline__ int platform_test_xfs_fd(int fd)
-{
- struct statfs buf;
- if (fstatfs(fd, &buf) < 0)
- return 0;
- return (buf.f_type == 0x58465342); /* XFSB */
-}
-
-static __inline__ int platform_test_xfs_path(const char *path)
-{
- struct statfs buf;
- if (statfs(path, &buf) < 0)
- return 0;
- return (buf.f_type == 0x58465342); /* XFSB */
-}
-
-static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
-{
- return fstatfs(fd, buf);
-}
-
-#ifndef O_DIRECT
-# if defined (__powerpc__)
-# define O_DIRECT 0400000
-# elif defined (__sparc__)
-# define O_DIRECT 0x100000
-# endif
-#endif
-
-#if (__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ <= 1))
-# define constpp const char * const *
-#else
-# define constpp char * const *
-#endif
-
-#define ENOATTR ENODATA /* Attribute not found */
-#define EFSCORRUPTED 990 /* Filesystem is corrupted */
-
-typedef loff_t xfs_off_t;
-typedef __uint64_t xfs_ino_t;
-typedef __uint32_t xfs_dev_t;
-typedef __int64_t xfs_daddr_t;
-typedef char* xfs_caddr_t;
-
-#ifndef _UCHAR_T_DEFINED
-typedef unsigned char uchar_t;
-#define _UCHAR_T_DEFINED 1
-#endif
-
-#ifndef _BOOLEAN_T_DEFINED
-typedef enum {B_FALSE, B_TRUE} boolean_t;
-#define _BOOLEAN_T_DEFINED 1
-#endif
-
+#include <xfs/linux.h>
#elif defined(__FreeBSD__)
-
-#include <sys/stat.h>
-#include <sys/param.h>
-#include <sys/ioccom.h>
-#include <sys/mount.h>
-#include <ctype.h>
-#include <libgen.h>
-#include <paths.h>
-#include <uuid.h>
-
-#include <machine/endian.h>
-
-/* FreeBSD file API is 64-bit aware */
-#define fstat64 fstat
-#define ftruncate64 ftruncate
-#define lseek64 lseek
-#define stat64 stat
-#define pwrite64 pwrite
-#define pread64 pread
-#define fdatasync fsync
-#define memalign(a,size) valloc(size)
-
-typedef u_int8_t __u8;
-typedef int8_t __s8;
-typedef u_int16_t __u16;
-typedef int16_t __s16;
-typedef u_int32_t __u32;
-typedef int32_t __s32;
-typedef u_int64_t __u64;
-typedef int64_t __s64;
-
-#define constpp char * const *
-
-#define EFSCORRUPTED 990 /* Filesystem is corrupted */
-
-typedef off_t xfs_off_t;
-typedef off_t off64_t;
-typedef __uint64_t xfs_ino_t;
-typedef __uint32_t xfs_dev_t;
-typedef __int64_t xfs_daddr_t;
-typedef char* xfs_caddr_t;
-typedef off_t loff_t;
-
-#ifndef _UCHAR_T_DEFINED
-typedef unsigned char uchar_t;
-#define _UCHAR_T_DEFINED 1
-#endif
-typedef enum { B_FALSE,B_TRUE } boolean_t;
-
-#define O_LARGEFILE 0
-
-#define HAVE_FID 1
-#define HAVE_SWABMACROS 1
-#define INT_SWAP16(type,var) ((typeof(type))(__bswap16((__u16)(var))))
-#define INT_SWAP32(type,var) ((typeof(type))(__bswap32((__u32)(var))))
-#define INT_SWAP64(type,var) ((typeof(type))(__bswap64((__u64)(var))))
-
-static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
-{
- return ioctl(fd, cmd, p);
-}
-
-static __inline__ int platform_test_xfs_fd(int fd)
-{
- struct statfs buf;
- if (fstatfs(fd, &buf) < 0)
- return 0;
- return strcpy(buf.f_fstypename, "xfs") == 0;
-}
-
-static __inline__ int platform_test_xfs_path(const char *path)
-{
- struct statfs buf;
- if (statfs(path, &buf) < 0)
- return 0;
- return strcpy(buf.f_fstypename, "xfs") == 0;
-}
-
-static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
-{
- return fstatfs(fd, buf);
-}
-
-/*
- * Implement Linux libuuid functions in terms of DEC DCE's uuid
- * functions from FreeBSD libc.
- */
-
-static __inline__ int gnu_uuid_compare(uuid_t a, uuid_t b)
-{
- return uuid_compare(&a, &b, NULL);
-}
-#define uuid_compare gnu_uuid_compare
-
-static __inline__ int uuid_is_null(uuid_t uid)
-{
- return uuid_is_nil(&uid, NULL);
-}
-
-static __inline__ void uuid_unparse(uuid_t uid, char *buf)
-{
- uint32_t status;
- char *str;
- uuid_to_string(&uid, &str, &status);
- if (status == uuid_s_ok)
- strcpy(buf, str);
- else *buf = '\0';
- free(str);
-}
-
-static __inline__ int gnu_uuid_parse(const char *buf, uuid_t *uid)
-{
- uint32_t status;
- uuid_from_string(buf, uid, &status);
- return (status == uuid_s_ok);
-}
-#define uuid_parse(s,u) gnu_uuid_parse((s), &(u))
-
-#define uuid_generate(uid) uuid_create(&(uid), NULL)
-#define uuid_clear(uid) uuid_create_nil(&(uid), NULL)
-#define uuid_copy(dst, src) memcpy(&(dst), &(src), sizeof(uuid_t))
-
-#elif defined(__APPLE__) /* Darwin */
-#include <uuid/uuid.h>
-#include <libgen.h>
-#include <sys/vm.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/mount.h>
-
-#include <sys/syscall.h>
-# ifndef SYS_fsctl
-# define SYS_fsctl 242
-# endif
-static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
-{
- return syscall(SYS_fsctl, path, cmd, p, 0);
-}
-
-static __inline__ int platform_test_xfs_fd(int fd)
-{
- struct statfs buf;
- if (fstatfs(fd, &buf) < 0)
- return 0;
- return (strcmp(buf.f_fstypename, "xfs") == 0);
-}
-
-static __inline__ int platform_test_xfs_path(const char *path)
-{
- struct statfs buf;
- if (statfs(path, &buf) < 0)
- return 0;
- return (strcmp(buf.f_fstypename, "xfs") == 0);
-}
-
-static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
-{
- return fstatfs(fd, buf);
-}
-
-#define __int8_t int8_t
-#define __int16_t int16_t
-#define __int32_t int32_t
-#define __int32_t int32_t
-#define __int64_t int64_t
-#define __uint8_t u_int8_t
-#define __uint16_t u_int16_t
-#define __uint32_t u_int32_t
-#define __uint64_t u_int64_t
-#define __s8 int8_t
-#define __s16 int16_t
-#define __s32 int32_t
-#define __s64 int64_t
-#define __u8 u_int8_t
-#define __u16 u_int16_t
-#define __u32 u_int32_t
-#define __u64 u_int64_t
-#define loff_t off_t
-#define off64_t off_t
-
-typedef off_t xfs_off_t;
-typedef u_int64_t xfs_ino_t;
-typedef u_int32_t xfs_dev_t;
-typedef int64_t xfs_daddr_t;
-typedef char* xfs_caddr_t;
-
-typedef unsigned char uchar_t;
-#define stat64 stat
-#define fstat64 fstat
-#define lseek64 lseek
-#define pread64 pread
-#define pwrite64 pwrite
-#define ftruncate64 ftruncate
-#define fdatasync fsync
-#define memalign(a,sz) valloc(sz)
-
-#include <machine/endian.h>
-#define __BYTE_ORDER BYTE_ORDER
-#define __BIG_ENDIAN BIG_ENDIAN
-#define __LITTLE_ENDIAN LITTLE_ENDIAN
-#include <xfs/swab.h>
-
-#define O_LARGEFILE 0
-#ifndef O_DIRECT
-#define O_DIRECT 0
-#endif
-#ifndef O_SYNC
-#define O_SYNC 0
-#endif
-
-#define B_FALSE 0
-#define B_TRUE 1
-
-#define ENOATTR 989 /* Attribute not found */
-#define EFSCORRUPTED 990 /* Filesystem is corrupted */
-#define constpp char * const *
-
-#define HAVE_FID 1
-
-#elif defined(__sgi__) /* SGI IRIX */
-
-#include <libgen.h>
-#include <values.h>
-#include <strings.h>
-#include <inttypes.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/statfs.h>
-#include <sys/statvfs.h>
-#include <sys/sysmacros.h>
-#include <uuid/uuid.h>
-
-#define __s8 char
-#define __s16 short
-#define __s32 __int32_t
-#define __s64 __int64_t
-#define __u8 unsigned char
-#define __u16 unsigned short
-#define __u32 __int32_t
-#define __u64 __int64_t
-#define __int8_t char
-#define __int16_t short
-#define __uint8_t unsigned char
-#define __uint16_t unsigned short
-#define loff_t off64_t
-typedef off64_t xfs_off_t;
-typedef __int64_t xfs_ino_t;
-typedef __int32_t xfs_dev_t;
-typedef __int64_t xfs_daddr_t;
-typedef char* xfs_caddr_t;
-
-#include <sys/endian.h>
-#define __BYTE_ORDER BYTE_ORDER
-#define __BIG_ENDIAN BIG_ENDIAN
-#define __LITTLE_ENDIAN LITTLE_ENDIAN
-#include <xfs/swab.h>
-
-#define INT_MAX INT32_MAX
-#define UINT_MAX UINT32_MAX
-#define PATH_MAX MAXPATHLEN
-#define constpp char * const *
-#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
-
-static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
-{
- fprintf(stderr, "%s: line %d syssgi/fcntl mapping not implemented\n",
- __FILE__, __LINE__);
- errno = ENOSYS;
- return -1;
-}
-
-static __inline__ int platform_test_xfs_fd(int fd)
-{
- struct statvfs sbuf;
- if (fstatvfs(fd, &sbuf) < 0)
- return 0;
- return (strcmp(sbuf.f_basetype, "xfs") == 0);
-}
-
-static __inline__ int platform_test_xfs_path(const char *path)
-{
- struct statvfs sbuf;
- if (statvfs(path, &sbuf) < 0)
- return 0;
- return (strcmp(sbuf.f_basetype, "xfs") == 0);
-}
-
-static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
-{
- return fstatfs(fd, buf, sizeof(struct statfs), 0);
-}
-
-static __inline__ char * strsep(char **s, const char *ct)
-{
- char *sbegin = *s, *end;
-
- if (!sbegin)
- return NULL;
- end = strpbrk(sbegin, ct);
- if (end)
- *end++ = '\0';
- *s = end;
- return sbegin;
-}
-
-#define HAVE_DIOATTR 1
-#define HAVE_FSXATTR 1
-#define HAVE_GETBMAP 1
-#define HAVE_GETBMAPX 1
-#define HAVE_FSDMIDATA 1
-#define HAVE_FID 1
-#define HAVE_BBMACROS 1
-
-
+#include <xfs/freebsd.h>
+#elif defined(__APPLE__)
+#include <xfs/darwin.h>
+#elif defined(__sgi__)
+#include <xfs/irix.h>
#else
# error unknown platform... have fun porting!
#endif
/*
- * Copyright (c) 1995-2003 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 1995-2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2.1 of the GNU Lesser General Public License
#define XFS_FSOP_GOING_FLAGS_LOGFLUSH 0x1 /* flush log but not data */
#define XFS_FSOP_GOING_FLAGS_NOLOGFLUSH 0x2 /* don't flush log nor data */
+#ifndef HAVE_IOCMACROS
/*
* ioctl commands that replace IRIX fcntl()'s
* For 'documentation' purposed more than anything else,
#define XFS_IOC_FSGEOMETRY _IOR ('X', 124, struct xfs_fsop_geom)
#define XFS_IOC_GOINGDOWN _IOR ('X', 125, __uint32_t)
/* XFS_IOC_GETFSUUID ---------- deprecated 140 */
-
+#endif
#ifndef HAVE_BBMACROS
/*
LSRCFILES = xfs_bmap.sh xfs_freeze.sh
HFILES = command.h input.h init.h io.h
CFILES = command.c input.c init.c \
- bmap.c file.c freeze.c fsync.c help.c inject.c \
+ bmap.c file.c freeze.c fsync.c help.c \
mmap.c open.c pread.c prealloc.c pwrite.c quit.c \
- resblks.c shutdown.c truncate.c
+ truncate.c
ifeq ($(PKG_PLATFORM),linux)
-CFILES += fadvise.c
-LCFLAGS += -DHAVE_FADVISE
+CFILES += fadvise.c sendfile.c
+LCFLAGS += -DHAVE_FADVISE -DHAVE_SENDFILE
else
-LSRCFILES += fadvise.c
+LSRCFILES += fadvise.c sendfile.c
+endif
+
+ifneq ($(PKG_PLATFORM),irix)
+CFILES += inject.c resblks.c shutdown.c
+LCFLAGS += -DHAVE_INJECT -DHAVE_RESBLKS -DHAVE_SHUTDOWN
+else
+LSRCFILES += inject.c resblks.c shutdown.c
endif
ifeq ($(ENABLE_READLINE),yes)
{
struct fsxattr fsx;
struct getbmapx *map;
- struct xfs_fsop_geom_v1 fsgeo;
+ struct xfs_fsop_geom fsgeo;
int map_size;
int loop = 0;
int flg = 0;
argc-1, cmd, ct->argmin, ct->argmax);
return 0;
}
- optind = 0;
+ platform_getoptreset();
return ct->cfunc(argc, argv);
}
pwrite_init();
quit_init();
resblks_init();
+ sendfile_init();
shutdown_init();
truncate_init();
}
extern void init_commands(void);
extern void bmap_init(void);
-#ifdef HAVE_FADVISE
-extern void fadvise_init(void);
-#else
-# define fadvise_init() do { } while (0)
-#endif
extern void file_init(void);
extern void freeze_init(void);
extern void fsync_init(void);
extern void prealloc_init(void);
extern void pwrite_init(void);
extern void quit_init(void);
-extern void resblks_init(void);
-extern void shutdown_init(void);
extern void truncate_init(void);
+#ifdef HAVE_FADVISE
+extern void fadvise_init(void);
+#else
+#define fadvise_init() do { } while (0)
+#endif
+
+#ifdef HAVE_INJECT
+extern void inject_init(void);
+#else
+#define inject_init() do { } while (0)
+#endif
+
+#ifdef HAVE_RESBLKS
+extern void resblks_init(void);
+#else
+#define resblks_init() do { } while (0)
+#endif
+
+#ifdef HAVE_SENDFILE
+extern void sendfile_init(void);
+#else
+#define sendfile_init() do { } while (0)
+#endif
+
+#ifdef HAVE_SHUTDOWN
+extern void shutdown_init(void);
+#else
+#define shutdown_init() do { } while (0)
+#endif
return 0;
}
+#if defined(__sgi__)
+int mincore(caddr_t p, size_t s, char *v) { errno = ENOSYS; return -1; }
+#endif
+
int
mincore_f(
int argc,
int argc,
char **argv)
{
- struct xfs_fsop_geom_v1 fsgeo;
+ struct xfs_fsop_geom fsgeo;
struct statfs st;
printf(_("fd.path = \"%s\"\n"), file->name);
printf(_("statfs.f_blocks = %lld\n"), (long long) st.f_blocks);
#if defined(__sgi__)
printf(_("statfs.f_frsize = %lld\n"), (long long) st.f_frsize);
-else
+#else
printf(_("statfs.f_bavail = %lld\n"), (long long) st.f_bavail);
#endif
printf(_("statfs.f_files = %lld\n"), (long long) st.f_files);
# MSGFMT MSGMERGE RPM
#
AC_DEFUN([AC_PACKAGE_UTILITIES],
- [ if test -z "$CC"; then
- AC_PROG_CC
- fi
+ [ AC_PROG_CC
cc="$CC"
AC_SUBST(cc)
AC_PACKAGE_NEED_UTILITY($1, "$cc", cc, [C compiler])
if test -z "$MAKE"; then
- AC_PATH_PROG(MAKE, make, /usr/bin/make)
+ AC_PATH_PROG(MAKE, gmake,, /usr/bin:/usr/freeware/bin)
+ fi
+ if test -z "$MAKE"; then
+ AC_PATH_PROG(MAKE, make,, /usr/bin)
fi
make=$MAKE
AC_SUBST(make)
AC_PACKAGE_NEED_UTILITY($1, "$make", make, [GNU make])
if test -z "$LIBTOOL"; then
- AC_PATH_PROG(LIBTOOL, libtool,,/usr/bin:/usr/local/bin)
+ AC_PATH_PROG(LIBTOOL, glibtool,, /usr/bin)
+ fi
+ if test -z "$LIBTOOL"; then
+ AC_PATH_PROG(LIBTOOL, libtool,, /usr/bin:/usr/local/bin:/usr/freeware/bin)
fi
libtool=$LIBTOOL
AC_SUBST(libtool)
AC_PACKAGE_NEED_UTILITY($1, "$libtool", libtool, [GNU libtool])
if test -z "$TAR"; then
- AC_PATH_PROG(TAR, tar)
+ AC_PATH_PROG(TAR, tar,, /usr/freeware/bin:/bin:/usr/local/bin:/usr/bin)
fi
tar=$TAR
AC_SUBST(tar)
if test -z "$ZIP"; then
- AC_PATH_PROG(ZIP, gzip, /bin/gzip)
+ AC_PATH_PROG(ZIP, gzip,, /bin:/usr/local/bin:/usr/freeware/bin)
fi
+
zip=$ZIP
AC_SUBST(zip)
+
if test -z "$MAKEDEPEND"; then
AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true)
fi
makedepend=$MAKEDEPEND
AC_SUBST(makedepend)
+
if test -z "$AWK"; then
- AC_PATH_PROG(AWK, awk, /bin/awk)
+ AC_PATH_PROG(AWK, awk,, /bin:/usr/bin)
fi
awk=$AWK
AC_SUBST(awk)
+
if test -z "$SED"; then
- AC_PATH_PROG(SED, sed, /bin/sed)
+ AC_PATH_PROG(SED, sed,, /bin:/usr/bin)
fi
sed=$SED
AC_SUBST(sed)
+
if test -z "$ECHO"; then
- AC_PATH_PROG(ECHO, echo, /bin/echo)
+ AC_PATH_PROG(ECHO, echo,, /bin:/usr/bin)
fi
echo=$ECHO
AC_SUBST(echo)
+
if test -z "$SORT"; then
- AC_PATH_PROG(SORT, sort, /bin/sort)
+ AC_PATH_PROG(SORT, sort,, /bin:/usr/bin)
fi
sort=$SORT
AC_SUBST(sort)
if test "$enable_gettext" = yes; then
if test -z "$MSGFMT"; then
- AC_CHECK_PROG(MSGFMT, msgfmt, /usr/bin/msgfmt)
+ AC_PATH_PROG(MSGFMT, msgfmt,, /usr/bin:/usr/freeware/bin)
fi
msgfmt=$MSGFMT
AC_SUBST(msgfmt)
AC_PACKAGE_NEED_UTILITY($1, "$msgfmt", msgfmt, gettext)
+
if test -z "$MSGMERGE"; then
- AC_CHECK_PROG(MSGMERGE, msgmerge, /usr/bin/msgmerge)
+ AC_PATH_PROG(MSGMERGE, msgmerge,, /usr/bin:/usr/freeware/bin)
fi
msgmerge=$MSGMERGE
AC_SUBST(msgmerge)
fi
if test -z "$RPM"; then
- AC_PATH_PROG(RPM, rpm, /bin/rpm)
+ AC_PATH_PROG(RPM, rpm,, /bin:/usr/freeware/bin)
fi
rpm=$RPM
AC_SUBST(rpm)
+
dnl .. and what version is rpm
rpm_version=0
test -x $RPM && rpm_version=`$RPM --version \
AC_DEFUN([AC_PACKAGE_NEED_UUID_H],
- [ AC_CHECK_HEADERS(uuid.h)
- if test $ac_cv_header_uuid_h = no; then
- AC_CHECK_HEADERS(uuid/uuid.h,, [
+ [ AC_CHECK_HEADERS([uuid.h sys/uuid.h uuid/uuid.h])
+ if test $ac_cv_header_uuid_h = no -a \
+ $ac_cv_header_sys_uuid_h = no -a \
+ $ac_cv_header_uuid_uuid_h = no; then
echo
echo 'FATAL ERROR: could not find a valid UUID header.'
echo 'Install the Universally Unique Identifiers development package.'
- exit 1])
+ exit 1
fi
])
the default value is \f2xfs_io\f1.
.TP
\f3\-F\f1
-Allow \f2file\f1 to be ``foreign'', i.e. not in an XFS filesystem.
+Allow \f2file\f1 to reside in non-XFS (foreign) filesystems.
This mode has a restricted set of commands.
.TP
\f3\-f\f1
Many commands have extensive online help.
Use the \f3help\f1 command for more details on any command.
.SH FILE I/O COMMANDS
+.TP
+\f3file\f1 [ \f2N\f1 ]
+Display a list of all open files and (optionally) switch to an alternate
+current open file.
.TP 10
\f3open\f1 [ \f2\-FacdfrstR\f1 ] [ \f2path\f1 ]
Closes the current file, and opens the file specified by \f2path\f1 instead.
.TP
\f3truncate\f1 \f2offset\f1
Truncates the current file at the given offset using \f2ftruncate\f1(2).
+.TP
+\f3sendfile\f1 \f2\-i infile\f1 | \f2\-f N\f1 [ \f2offset\f1 \f2length\f1 ]
+On platforms which support it, allows a direct in-kernel copy between
+two file descriptors.
+The current open file is the target, the source must be specified as
+another open file (\f2-f\f1) or by path (\f2-i\f2).
.SH MEMORY MAPPED I/O COMMANDS
.TP
-\f3mmap\f1 [ \f2-rwx\f1 ] [ \f2offset\f1 \f2length\f1 ]
+\f3mmap\f1 [ \f2-rwx\f1 ] [[ N ] | [ \f2offset\f1 \f2length\f1 ]]
With no arguments, \f3mmap\f1 shows the current mappings.
Specifying a single numeric argument sets the current mapping.
If two arguments are specified (a range), a new mapping is created