]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix an endianness issue in the FreeBSD headers, remove a no-longer-needed HAVE macro...
authorNathan Scott <nathans@sgi.com>
Mon, 29 May 2006 03:54:39 +0000 (03:54 +0000)
committerNathan Scott <nathans@sgi.com>
Mon, 29 May 2006 03:54:39 +0000 (03:54 +0000)
Merge of master-melb:xfs-cmds:26062a by kenmcd.

VERSION
debian/changelog
doc/CHANGES
include/darwin.h
include/freebsd.h
include/irix.h
include/xfs_arch.h

diff --git a/VERSION b/VERSION
index d2b5331a4aabd7c282b679173420ae50a0426bc9..e1be0f5e53c0d8123c22975ec731babf88e22d1e 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -3,5 +3,5 @@
 #
 PKG_MAJOR=2
 PKG_MINOR=8
-PKG_REVISION=0
+PKG_REVISION=1
 PKG_BUILD=1
index 71f2d5968fe97e916b992b2a3911e4a4bddb434d..92b616d9517cb10c838c235aac20ae1346ec35a2 100644 (file)
@@ -1,8 +1,8 @@
-xfsprogs (2.8.0-1) unstable; urgency=low
+xfsprogs (2.8.1-1) unstable; urgency=low
 
   * New upstream release.
 
- -- Nathan Scott <nathans@debian.org>  Thu, 18 May 2006 16:27:47 +1000
+ -- Nathan Scott <nathans@debian.org>  Mon, 29 May 2006 08:46:05 +1000
 
 xfsprogs (2.7.16-1) unstable; urgency=low
 
index c683cf620d666786fa95e559c1eb8e24ede5f436..fe8725395661b5d9b148502548320a8ea9d9a005 100644 (file)
@@ -1,3 +1,6 @@
+xfsprogs-2.8.1 (29 May 2006)
+       - Fix endianness issues on FreeBSD.
+
 xfsprogs-2.8.0 (18 May 2006)
        - Initial pass at user space caching, ultimately provides
          a starting point for a faster, parallel version of repair.
index e0164a5964cdfac91f65b507cd5746efe717e9df..87eec1b227f303db2fcec81748e6f71b1a0ea1d4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2005 Silicon Graphics, Inc.
+ * Copyright (c) 2004-2006 Silicon Graphics, Inc.
  * All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or
 #include <sys/ioctl.h>
 #include <sys/mount.h>
 
+#include <machine/endian.h>
+#define __BYTE_ORDER   BYTE_ORDER
+#define __BIG_ENDIAN   BIG_ENDIAN
+#define __LITTLE_ENDIAN        LITTLE_ENDIAN
+#include <xfs/swab.h>
+
 #include <sys/syscall.h>
 # ifndef SYS_fsctl
 #  define SYS_fsctl    242
@@ -39,7 +45,7 @@ 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);
+       return strncmp(buf.f_fstypename, "xfs", 4) == 0;
 }
 
 static __inline__ int platform_test_xfs_path(const char *path)
@@ -47,7 +53,7 @@ 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);
+       return strncmp(buf.f_fstypename, "xfs", 4) == 0;
 }
 
 static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
@@ -132,12 +138,6 @@ typedef unsigned char      uchar_t;
 #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
index b68f17d41f914c316791d7edbafd6545592be8ae..19d85d55f8ba6391aff03f96698c54cb1ee18b42 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2005 Silicon Graphics, Inc.
+ * Copyright (c) 2004-2006 Silicon Graphics, Inc.
  * All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or
 #include <paths.h>
 #include <uuid.h>
 
-#include <machine/endian.h>
+#include <sys/endian.h>
+#define __BYTE_ORDER   BYTE_ORDER
+#define __BIG_ENDIAN   BIG_ENDIAN
+#define __LITTLE_ENDIAN        LITTLE_ENDIAN
+#define __swab16(x)    __bswap16(x)
+#define __swab32(x)    __bswap32(x)
+#define __swab64(x)    __bswap64(x)
 
 /* FreeBSD file API is 64-bit aware */
-#define        fstat64         fstat
-#define        ftruncate64     ftruncate
+#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)
+#define stat64         stat
+#define pwrite64       pwrite
+#define pread64                pread
+#define fdatasync      fsync
+#define memalign(a,sz) valloc(sz)
 
 #define constpp        char * const *
 
@@ -60,10 +66,6 @@ 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)
 {
@@ -75,7 +77,7 @@ 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;
+       return strncmp(buf.f_fstypename, "xfs", 4) == 0;
 }
 
 static __inline__ int platform_test_xfs_path(const char *path)
@@ -83,7 +85,7 @@ 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;
+       return strncmp(buf.f_fstypename, "xfs", 4) == 0;
 }
 
 static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
index edca008bac643b8bc954a4cf273781d5b005b740..882f241a8fffb42e1309032215223ed25f034000 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2005 Silicon Graphics, Inc.
+ * Copyright (c) 2000-2006 Silicon Graphics, Inc.
  * All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or
@@ -122,10 +122,9 @@ typedef struct xfs_fsop_attrmulti_handlereq {
 #define __BYTE_ORDER   BYTE_ORDER
 #define __BIG_ENDIAN   BIG_ENDIAN
 #define __LITTLE_ENDIAN        LITTLE_ENDIAN
-#define HAVE_SWABMACROS        1
-#define INT_SWAP16(type,var)   (var)
-#define INT_SWAP32(type,var)   (var)
-#define INT_SWAP64(type,var)   (var)
+#define __swab16(x)    (x)
+#define __swab32(x)    (x)
+#define __swab64(x)    (x)
 
 /* Map some gcc macros for the MipsPRO compiler */
 #ifndef __GNUC__
@@ -231,7 +230,7 @@ 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);
+       return strncmp(sbuf.f_basetype, "xfs", 4) == 0;
 }
 
 static __inline__ int platform_test_xfs_path(const char *path)
@@ -239,7 +238,7 @@ 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);
+       return strncmp(sbuf.f_basetype, "xfs", 4) == 0;
 }
 
 static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
index c4836890b7268bce37384b4ed35c261c1ec8805e..b16825b9143632665f96f7b5e710de88e939f8ee 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
+ * Copyright (c) 2000-2002,2005-2006 Silicon Graphics, Inc.
  * All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or
 
 /* generic swapping macros */
 
-#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))))
-#endif
 
 #define INT_SWAP(type, var) \
     ((sizeof(type) == 8) ? INT_SWAP64(type,var) : \
@@ -199,7 +197,7 @@ static inline void be64_add(__be64 *a, __s64 b)
  * into 32bits a four-member array is used:
  *
  *  |24-31|16-23| 8-15| 0- 7|
- */ 
+ */
 
 #define XFS_GET_DIR_INO4(di) \
        (((__u32)(di).i[0] << 24) | ((di).i[1] << 16) | ((di).i[2] << 8) | ((di).i[3]))
@@ -232,5 +230,5 @@ do { \
        (di).i[6] = (((from) & 0x000000000000ff00ULL) >> 8); \
        (di).i[7] = ((from) & 0x00000000000000ffULL); \
 } while (0)
-       
+
 #endif /* __XFS_ARCH_H__ */