From f96aff0c250ae8c70f50d5becb592723eb064f5d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 20 Nov 2009 10:55:15 +0100 Subject: [PATCH] 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 Reviewed-by: Eric Sandeen --- include/darwin.h | 2 +- include/freebsd.h | 2 +- include/irix.h | 2 +- include/linux.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/darwin.h b/include/darwin.h index 69c032277..97b8990d2 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 7089dd97c..2e1ae4984 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 f75193939..a450684ec 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 048648513..dbfb4cf36 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; -- 2.47.2