Add some text re Russells FreeBSD changes.
xfsprogs-2.4.4 (30 March 2003)
- Correct display of imaxpct in mkfs.xfs output.
- Portability changes; including some code to support use
- of several tools on Mac OS X (for Russell), also did a
- simplistic backport to IRIX (for me), so that I can run
- purify on some of the tools.
+ of several tools on Mac OS X (for Russell), ditto for
+ FreeBSD (from Russell); also did a simplistic backport
+ to IRIX (for me), so that I can run purify on some of
+ the tools.
- See doc/INSTALL for more details on this.
- Sync up user/kernel source in libxfs and headers.
- Fix up some warnings when compiling libxfs on big endian
Building xfsprogs:
[firstly set these environment variables to these values]
+ INSTALL_GROUP=sys
CC=/usr/freeware/bin/gcc
TAR=/usr/freeware/bin/tar
MAKE=/usr/freeware/bin/gmake
MSGFMT=/usr/freeware/bin/msgfmt
MSGMERGE=/usr/freeware/bin/msgmerge
XGETTEXT=/usr/freeware/bin/xgettext
- INSTALL_GROUP=sys
- LOCAL_CONFIGURE_OPTIONS="--enable-gettext=no"
$ make
$ su root
endif
ifeq ($(PKG_PLATFORM),freebsd)
PLDLIBS = -L/usr/local/lib -lintl
-CFLAGS += -I/usr/local/include
+PCFLAGS = -I/usr/local/include
endif
GCFLAGS += $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall -I$(TOPDIR)/include \
#include <sys/types.h>
#include <uuid/uuid.h>
+
#if defined(__linux__)
#include <sys/vfs.h>
#endif
typedef enum { B_FALSE,B_TRUE } boolean_t;
+
#elif defined(__FreeBSD__)
+
#include <sys/stat.h>
#include <libgen.h>
#include <machine/endian.h>
#include <sys/param.h>
#include <paths.h>
#include <ctype.h>
+
/* FreeBSD file API is 64-bit aware */
#define fstat64 fstat
#define ftruncate64 ftruncate
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
typedef enum { B_FALSE,B_TRUE } boolean_t;
+
#define HAVE_FID 1
+#define HAVE_SWABMACROS 1
+
#elif defined(__APPLE__) /* Darwin */
#include <asm/byteorder.h>
#ifdef __LITTLE_ENDIAN
-# define __BYTE_ORDER __LITTLE_ENDIAN
+#define __BYTE_ORDER __LITTLE_ENDIAN
#endif
#ifdef __BIG_ENDIAN
-# define __BYTE_ORDER __BIG_ENDIAN
+#define __BYTE_ORDER __BIG_ENDIAN
#endif
#endif /* __KERNEL__ */
/* generic swapping macros */
-#if defined(__linux__)
+#ifndef HAVE_SWABMACROS
#define INT_SWAP16(type,var) ((typeof(type))(__swab16((__u16)(var))))
#define INT_SWAP32(type,var) ((typeof(type))(__swab32((__u32)(var))))
#define INT_SWAP64(type,var) ((typeof(type))(__swab64((__u64)(var))))
xfs_mount.c xfs_trans.c
CFILES += $(PKG_PLATFORM).c
-PCFILES = darwin.c irix.c linux.c
+PCFILES = darwin.c freebsd.c irix.c linux.c
LSRCFILES = $(shell echo $(PCFILES) | sed -e "s/$(PKG_PLATFORM).c//g")
#
part = *s2++ - 'a';
}
if (!s2 || (*s2 && *s2 != '.')) {
- fprintf(stderr, "%s: can't figure out partition info\n",
+ fprintf(stderr, _("%s: can't figure out partition info\n"),
progname);
exit(1);
}
errno = e;
}
if (i == -1) {
- fprintf(stderr, "%s: can't read disk label: %s\n",
+ fprintf(stderr, _("%s: can't read disk label: %s\n"),
progname, strerror(errno));
exit(1);
}
part = RAW_PART;
if (part >= lp->d_npartitions ||
!lp->d_partitions[part].p_size) {
- fprintf(stderr, "%s: partition %s is unavailable\n",
- progname, fname);
+ fprintf(stderr,
+ _("%s: partition %s is unavailable\n"),
+ progname, fname);
exit(1);
}
size = lp->d_partitions[part].p_size;
* block device, if we are just use the size returned by stat64
*/
if (stat(path, &st) < 0) {
- fprintf(stderr, "%s: "
- "cannot stat the device special file \"%s\": %s\n",
+ fprintf(stderr, _("%s: "
+ "cannot stat the device special file \"%s\": %s\n"),
progname, path, strerror(errno));
exit(1);
}
}
if ((fd = open(path, 0)) < 0) {
- fprintf(stderr, "%s: "
- "error opening the device special file \"%s\": %s\n",
+ fprintf(stderr, _("%s: "
+ "error opening the device special file \"%s\": %s\n"),
progname, path, strerror(errno));
exit(1);
}
$(TOPDIR)/libdisk/lvm.c \
$(TOPDIR)/libdisk/md.c \
$(TOPDIR)/libxfs/darwin.c \
+ $(TOPDIR)/libxfs/freebsd.c \
$(TOPDIR)/libxfs/init.c \
$(TOPDIR)/libxfs/irix.c \
$(TOPDIR)/libxfs/linux.c \
msgid "%s: can't determine device size: %s\n"
msgstr ""
+#, c-format
+msgid "%s: can't figure out partition info\n"
+msgstr ""
+
+#, c-format
+msgid "%s: can't read disk label: %s\n"
+msgstr ""
+
+#, c-format
+msgid "%s: partition %s is unavailable\n"
+msgstr ""
+
+#, c-format
+msgid "%s: cannot stat the device special file \"%s\": %s\n"
+msgstr ""
+
#, c-format
msgid "%s: %s: device %lld is not open\n"
msgstr ""