From c9c238d22bd0b78abe0ee4aa72a675492802eec0 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 13 May 2009 13:31:47 -0500 Subject: [PATCH] fsx: Use SEEK_END instead of the BSD'ish L_XTND Signed-off-by: "Theodore Ts'o" Signed-off-by: Eric Sandeen --- ltp/fsx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ltp/fsx.c b/ltp/fsx.c index 210afd57..50250bf5 100644 --- a/ltp/fsx.c +++ b/ltp/fsx.c @@ -294,7 +294,7 @@ save_buffer(char *buffer, off_t bufferlength, int fd) exit(67); } if (lite) { - off_t size_by_seek = lseek(fd, (off_t)0, L_XTND); + off_t size_by_seek = lseek(fd, (off_t)0, SEEK_END); if (size_by_seek == (off_t)-1) prterr("save_buffer: lseek eof"); else if (bufferlength > size_by_seek) { @@ -395,7 +395,7 @@ check_size(void) prterr("check_size: fstat"); statbuf.st_size = -1; } - size_by_seek = lseek(fd, (off_t)0, L_XTND); + size_by_seek = lseek(fd, (off_t)0, SEEK_END); if (file_size != statbuf.st_size || file_size != size_by_seek) { prt("Size error: expected 0x%qx stat 0x%qx seek 0x%qx\n", (unsigned long long)file_size, @@ -1256,7 +1256,7 @@ main(int argc, char **argv) if (lite) { off_t ret; - file_size = maxfilelen = lseek(fd, (off_t)0, L_XTND); + file_size = maxfilelen = lseek(fd, (off_t)0, SEEK_END); if (file_size == (off_t)-1) { prterr(fname); warn("main: lseek eof"); -- 2.47.3