]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Minor tweaks to Russells FreeBSD changes in xfsprogs.
authorNathan Scott <nathans@sgi.com>
Wed, 2 Apr 2003 23:52:41 +0000 (23:52 +0000)
committerNathan Scott <nathans@sgi.com>
Wed, 2 Apr 2003 23:52:41 +0000 (23:52 +0000)
Add some text re Russells FreeBSD changes.

doc/CHANGES
doc/INSTALL
include/builddefs.in
include/platform_defs.h.in
include/xfs_arch.h
libxfs/Makefile
libxfs/freebsd.c
po/Makefile
po/xfsprogs.pot

index 4034eed4806e91b6240d115fbee6710e0cde0646..fc7d699796ea4f91ebed31abc437b3d6acd76b57 100644 (file)
@@ -1,9 +1,10 @@
 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
index 2ef911d864b1ea97793038099cc670bb9e856739..2ecbf6ced82d8daa49e981967ea789da4ed14e4a 100644 (file)
@@ -128,6 +128,7 @@ IRIX Instructions
    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
@@ -135,8 +136,6 @@ IRIX Instructions
        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
index 95792e1bd22c5f719a756a1bb4ea9079f741c074..b939c8c4c11705a98e753191aa90fa0f8d442515 100644 (file)
@@ -105,7 +105,7 @@ PLDLIBS = -ldisk -lgen
 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 \
index 532753ebfb1f0ed759fc766f9b6a7b58e2502959..f686f97a33ffc0cf25df7a89259449efcdf96e54 100644 (file)
@@ -46,6 +46,7 @@
 #include <sys/types.h>
 #include <uuid/uuid.h>
 
+
 #if defined(__linux__)
 
 #include <sys/vfs.h>
@@ -104,13 +105,16 @@ typedef unsigned char     uchar_t;
 #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
@@ -139,13 +143,15 @@ 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
 typedef enum { B_FALSE,B_TRUE }        boolean_t;
+
 #define HAVE_FID       1
+#define HAVE_SWABMACROS        1
+
 
 #elif defined(__APPLE__)       /* Darwin */
 
index 164510175eead0c36bcc27ca3de7e032be73b805..eb09e7a999f4cd5e4d28b768f198747dccccede8 100644 (file)
 #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__ */
@@ -60,7 +60,7 @@
 
 /* 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))))
index 72f11c933e4a56d5064d4739c0341921cf5c57e7..efbe4981f1b963d6f0b74b9bd9e3d8d26ad91aca 100644 (file)
@@ -48,7 +48,7 @@ CFILES = bit.c init.c logitem.c rdwr.c trans.c util.c \
        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")
 
 # 
index c6e1efa637ff5282efa0f9556f8946eba0b8d32f..ecb81f190c8b5147cde1f9c32ce01c6cb98f5b44 100644 (file)
@@ -116,7 +116,7 @@ getdisksize(int fd, const char *fname)
                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);
        }
@@ -140,7 +140,7 @@ getdisksize(int fd, const char *fname)
                        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);
                }
@@ -149,8 +149,9 @@ getdisksize(int fd, const char *fname)
                                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;
@@ -170,8 +171,8 @@ platform_findsize(char *path)
         * 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);
        }
@@ -180,8 +181,8 @@ platform_findsize(char *path)
        }
 
        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);
        }
index e733186cc016bdc83e71a85ec9610cb375464ab1..bc1505777e94861b15441ba33d7bd5e97f9b28c8 100644 (file)
@@ -62,6 +62,7 @@ XGETTEXTFILES =       \
                $(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 \
index a235724c17028de06f9931804d31da6c2eb71cd9..ecafc8e5a4f947b1296482b2891aaabad1f3eace 100644 (file)
@@ -1218,6 +1218,22 @@ msgstr ""
 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 ""