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>
#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;
}
}
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;
}
}
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;
}
#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;