]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: stop using off64_t in platform headers
authorChristoph Hellwig <hch@lst.de>
Fri, 20 Nov 2009 09:55:15 +0000 (10:55 +0100)
committerhch@lst.de <Christoph Hellwig>
Fri, 20 Nov 2009 09:55:15 +0000 (10:55 +0100)
Using off64_t may require special headers or compiler flags that aren't
always available, e.g. in the configure check in xfstests.  Rever to a plain
uint64_t to make apps compile as before.

While we're at it also rename the second argument of platform_discard_blocks
from end to len as that's what the BLKDISCARD ioctl excepts - we currently
always discard the whole device so it doesn't matter in practice.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
include/darwin.h
include/freebsd.h
include/irix.h
include/linux.h

index 69c03227753063133540ddf31fadc8dec3de780f..97b8990d24df093e8cc77686e240a8737698235b 100644 (file)
@@ -155,7 +155,7 @@ typedef unsigned char       uchar_t;
 #define HAVE_FID       1
 
 static __inline__ int
-platform_discard_blocks(int fd, off64_t start, off64_t end)
+platform_discard_blocks(int fd, uint64_t start, uint64_t len)
 {
        return 0;
 }
index 7089dd97ca9d5ba77f4b709a6a7b92116ecfb847..2e1ae4984ad8262fd2d25ec2c73fdc218a08174f 100644 (file)
@@ -140,7 +140,7 @@ static __inline__ void platform_uuid_copy(uuid_t *dst, uuid_t *src)
 }
 
 static __inline__ int
-platform_discard_blocks(int fd, off64_t start, off64_t end)
+platform_discard_blocks(int fd, uint64_t start, uint64_t len)
 {
        return 0;
 }
index f75193939acfa41f21e5a6251b64fc8011dbd49c..a450684eca4d1dcb926709e225e41c05d2607c54 100644 (file)
@@ -338,7 +338,7 @@ static __inline__ void platform_uuid_copy(uuid_t *dst, uuid_t *src)
 }
 
 static __inline__ int
-platform_discard_blocks(int fd, off64_t start, off64_t end)
+platform_discard_blocks(int fd, uint64_t start, uint64_t len)
 {
        return 0;
 }
index 0486485137d642ca371d95e3e71814092976bc90..dbfb4cf36824c62a0448b394267482194f6d7d61 100644 (file)
@@ -98,9 +98,9 @@ static __inline__ void platform_uuid_copy(uuid_t *dst, uuid_t *src)
 #endif
 
 static __inline__ int
-platform_discard_blocks(int fd, off64_t start, off64_t end)
+platform_discard_blocks(int fd, uint64_t start, uint64_t len)
 {
-       __uint64_t range[2] = { start, end };
+       __uint64_t range[2] = { start, len };
 
        if (ioctl(fd, BLKDISCARD, &range) < 0)
                return errno;