diff options
| author | 2009-11-20 10:55:15 +0100 | |
|---|---|---|
| committer | 2009-11-20 10:55:15 +0100 | |
| commit | f96aff0c250ae8c70f50d5becb592723eb064f5d (patch) | |
| tree | 6cfb18b0992c818b82f8e7100aa2ad80e1acd9c3 | |
| parent | b4663288fde18e967338a7a1f0b59d7f1883dbd1 (diff) | |
| download | xfsprogs-dev-f96aff0c250ae8c70f50d5becb592723eb064f5d.tar.gz | |
xfsprogs: stop using off64_t in platform headers
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>
| -rw-r--r-- | include/darwin.h | 2 | ||||
| -rw-r--r-- | include/freebsd.h | 2 | ||||
| -rw-r--r-- | include/irix.h | 2 | ||||
| -rw-r--r-- | include/linux.h | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/include/darwin.h b/include/darwin.h index 69c0322..97b8990 100644 --- a/include/darwin.h +++ b/include/darwin.h @@ -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; } diff --git a/include/freebsd.h b/include/freebsd.h index 7089dd9..2e1ae49 100644 --- a/include/freebsd.h +++ b/include/freebsd.h @@ -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; } diff --git a/include/irix.h b/include/irix.h index f751939..a450684 100644 --- a/include/irix.h +++ b/include/irix.h @@ -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; } diff --git a/include/linux.h b/include/linux.h index 0486485..dbfb4cf 100644 --- a/include/linux.h +++ b/include/linux.h @@ -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; |
