From: Felix Janda Date: Tue, 1 Nov 2016 01:38:25 +0000 (+1100) Subject: xfsprogs: replace [fl]stat64 by equivalent [fl]stat X-Git-Tag: v4.9.0-rc1~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f594a0d1db79f56b53613fdd002626e1e1e5393c;p=thirdparty%2Fxfsprogs-dev.git xfsprogs: replace [fl]stat64 by equivalent [fl]stat Signed-off-by: Felix Janda Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner --- diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c index 22ded6b12..ff279c336 100644 --- a/copy/xfs_copy.c +++ b/copy/xfs_copy.c @@ -28,7 +28,7 @@ #define rounddown(x, y) (((x)/(y))*(y)) #define uuid_equal(s,d) (platform_uuid_compare((s),(d)) == 0) -extern int platform_check_ismounted(char *, char *, struct stat64 *, int); +extern int platform_check_ismounted(char *, char *, struct stat *, int); int logfd; char *logfile_name; @@ -562,7 +562,7 @@ main(int argc, char **argv) extern int optind; libxfs_init_t xargs; thread_args *tcarg; - struct stat64 statbuf; + struct stat statbuf; progname = basename(argv[0]); @@ -643,7 +643,7 @@ main(int argc, char **argv) die_perror(); } - if (fstat64(source_fd, &statbuf) < 0) { + if (fstat(source_fd, &statbuf) < 0) { do_log(_("%s: couldn't stat source \"%s\"\n"), progname, source_name); die_perror(); @@ -794,7 +794,7 @@ main(int argc, char **argv) for (i = 0; i < num_targets; i++) { int write_last_block = 0; - if (stat64(target[i].name, &statbuf) < 0) { + if (stat(target[i].name, &statbuf) < 0) { /* ok, assume it's a file and create it */ do_out(_("Creating file %s\n"), target[i].name); diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c index d75990a73..36e070571 100644 --- a/fsr/xfs_fsr.c +++ b/fsr/xfs_fsr.c @@ -174,12 +174,12 @@ aborter(int unused) * of that. */ static char * -find_mountpoint_check(struct stat64 *sb, struct mntent *t) +find_mountpoint_check(struct stat *sb, struct mntent *t) { - struct stat64 ms; + struct stat ms; if (S_ISDIR(sb->st_mode)) { /* mount point */ - if (stat64(t->mnt_dir, &ms) < 0) + if (stat(t->mnt_dir, &ms) < 0) return NULL; if (sb->st_ino != ms.st_ino) return NULL; @@ -188,7 +188,7 @@ find_mountpoint_check(struct stat64 *sb, struct mntent *t) if (strcmp(t->mnt_type, MNTTYPE_XFS) != 0) return NULL; } else { /* device */ - if (stat64(t->mnt_fsname, &ms) < 0) + if (stat(t->mnt_fsname, &ms) < 0) return NULL; if (sb->st_rdev != ms.st_rdev) return NULL; @@ -198,7 +198,7 @@ find_mountpoint_check(struct stat64 *sb, struct mntent *t) * Make sure the mountpoint given by mtab is accessible * before using it. */ - if (stat64(t->mnt_dir, &ms) < 0) + if (stat(t->mnt_dir, &ms) < 0) return NULL; } @@ -206,7 +206,7 @@ find_mountpoint_check(struct stat64 *sb, struct mntent *t) } static char * -find_mountpoint(char *mtab, char *argname, struct stat64 *sb) +find_mountpoint(char *mtab, char *argname, struct stat *sb) { struct mntent_cursor cursor; struct mntent *t = NULL; @@ -230,7 +230,7 @@ find_mountpoint(char *mtab, char *argname, struct stat64 *sb) int main(int argc, char **argv) { - struct stat64 sb; + struct stat sb; char *argname; int c; char *mntp; @@ -327,7 +327,7 @@ main(int argc, char **argv) for (; optind < argc; optind++) { argname = argv[optind]; - if (lstat64(argname, &sb) < 0) { + if (lstat(argname, &sb) < 0) { fprintf(stderr, _("%s: could not stat: %s: %s\n"), progname, argname, strerror(errno)); @@ -335,9 +335,9 @@ main(int argc, char **argv) } if (S_ISLNK(sb.st_mode)) { - struct stat64 sb2; + struct stat sb2; - if (stat64(argname, &sb2) == 0 && + if (stat(argname, &sb2) == 0 && (S_ISBLK(sb2.st_mode) || S_ISCHR(sb2.st_mode))) sb = sb2; @@ -405,7 +405,7 @@ initallfs(char *mtab) struct mntent *mnt= NULL; int mi; char *cp; - struct stat64 sb; + struct stat sb; /* malloc a number of descriptors, increased later if needed */ if (!(fsbase = (fsdesc_t *)malloc(fsbufsize * sizeof(fsdesc_t)))) { @@ -427,7 +427,7 @@ initallfs(char *mtab) int rw = 0; if (strcmp(mnt->mnt_type, MNTTYPE_XFS ) != 0 || - stat64(mnt->mnt_fsname, &sb) == -1 || + stat(mnt->mnt_fsname, &sb) == -1 || !S_ISBLK(sb.st_mode)) continue; @@ -502,7 +502,7 @@ fsrallfs(char *mtab, int howlong, char *leftofffile) char *ptr; xfs_ino_t startino = 0; fsdesc_t *fsp; - struct stat64 sb, sb2; + struct stat sb, sb2; fsrprintf("xfs_fsr -m %s -t %d -f %s ...\n", mtab, howlong, leftofffile); @@ -510,11 +510,11 @@ fsrallfs(char *mtab, int howlong, char *leftofffile) fs = fsbase; /* where'd we leave off last time? */ - if (lstat64(leftofffile, &sb) == 0) { + if (lstat(leftofffile, &sb) == 0) { if ( (fd = open(leftofffile, O_RDONLY)) == -1 ) { fsrprintf(_("%s: open failed\n"), leftofffile); } - else if ( fstat64(fd, &sb2) == 0) { + else if ( fstat(fd, &sb2) == 0) { /* * Verify that lstat & fstat point to the * same regular file (no links/no quick spoofs) @@ -1027,7 +1027,7 @@ fsr_setup_attr_fork( xfs_bstat_t *bstatp) { #ifdef HAVE_FSETXATTR - struct stat64 tstatbuf; + struct stat tstatbuf; int i; int diff = 0; int last_forkoff = 0; @@ -1054,7 +1054,7 @@ fsr_setup_attr_fork( /* attr2 w/ fork offsets */ - if (fstat64(tfd, &tstatbuf) < 0) { + if (fstat(tfd, &tstatbuf) < 0) { fsrprintf(_("unable to stat temp file: %s\n"), strerror(errno)); return -1; diff --git a/include/darwin.h b/include/darwin.h index 6c9f87ac9..df5fbd8b7 100644 --- a/include/darwin.h +++ b/include/darwin.h @@ -142,8 +142,6 @@ typedef u_int32_t xfs_dev_t; typedef int64_t xfs_daddr_t; typedef __u32 xfs_nlink_t; -#define stat64 stat -#define fstat64 fstat #define lseek64 lseek #define pread64 pread #define pwrite64 pwrite @@ -223,8 +221,7 @@ static inline int timer_gettime (timer_t timerid, struct itimerspec *value) # include #include #include -#define statvfs64 statfs -#define lstat64 lstat +#define statvfs64 statfs #define _PATH_MOUNTED "/etc/mtab" struct mntent diff --git a/include/freebsd.h b/include/freebsd.h index 72935ec8f..0f894e360 100644 --- a/include/freebsd.h +++ b/include/freebsd.h @@ -34,10 +34,8 @@ #define __LITTLE_ENDIAN LITTLE_ENDIAN /* FreeBSD file API is 64-bit aware */ -#define fstat64 fstat #define ftruncate64 ftruncate #define lseek64 lseek -#define stat64 stat #define pwrite64 pwrite #define pread64 pread #define fdatasync fsync diff --git a/io/copy_file_range.c b/io/copy_file_range.c index eddc63436..7ba42b63b 100644 --- a/io/copy_file_range.c +++ b/io/copy_file_range.c @@ -60,10 +60,10 @@ copy_file_range(int fd, loff_t *src, loff_t *dst, size_t len) static off64_t copy_src_filesize(int fd) { - struct stat64 st; + struct stat st; - if (fstat64(fd, &st) < 0) { - perror("fstat64"); + if (fstat(fd, &st) < 0) { + perror("fstat"); return -1; }; return st.st_size; diff --git a/io/open.c b/io/open.c index 628fa8535..722d0f9ea 100644 --- a/io/open.c +++ b/io/open.c @@ -52,10 +52,10 @@ static long extsize; off64_t filesize(void) { - struct stat64 st; + struct stat st; - if (fstat64(file->fd, &st) < 0) { - perror("fstat64"); + if (fstat(file->fd, &st) < 0) { + perror("fstat"); return -1; } return st.st_size; @@ -90,7 +90,7 @@ stat_f( { struct dioattr dio; struct fsxattr fsx, fsxa; - struct stat64 st; + struct stat st; int verbose = (argc == 2 && !strcmp(argv[1], "-v")); printf(_("fd.path = \"%s\"\n"), file->name); @@ -102,8 +102,8 @@ stat_f( file->flags & IO_APPEND ? _(",append-only") : "", file->flags & IO_NONBLOCK ? _(",non-block") : "", file->flags & IO_TMPFILE ? _(",tmpfile") : ""); - if (fstat64(file->fd, &st) < 0) { - perror("fstat64"); + if (fstat(file->fd, &st) < 0) { + perror("fstat"); } else { printf(_("stat.ino = %lld\n"), (long long)st.st_ino); printf(_("stat.type = %s\n"), filetype(st.st_mode)); @@ -575,10 +575,10 @@ static int set_extsize(const char *path, int fd, long extsz) { struct fsxattr fsx; - struct stat64 stat; + struct stat stat; - if (fstat64(fd, &stat) < 0) { - perror("fstat64"); + if (fstat(fd, &stat) < 0) { + perror("fstat"); return 0; } if ((xfsctl(path, fd, FS_IOC_FSGETXATTR, &fsx)) < 0) { diff --git a/io/sendfile.c b/io/sendfile.c index 21ab444a4..c082acf30 100644 --- a/io/sendfile.c +++ b/io/sendfile.c @@ -133,10 +133,10 @@ sendfile_f( goto done; } } else { - struct stat64 stat; + struct stat stat; - if (fstat64(fd, &stat) < 0) { - perror("fstat64"); + if (fstat(fd, &stat) < 0) { + perror("fstat"); goto done; } count = stat.st_size; diff --git a/libxcmd/paths.c b/libxcmd/paths.c index 97f47cf06..816acc22b 100644 --- a/libxcmd/paths.c +++ b/libxcmd/paths.c @@ -44,9 +44,9 @@ fs_device_number( const char *name, dev_t *devnum) { - struct stat64 sbuf; + struct stat sbuf; - if (stat64(name, &sbuf) < 0) + if (stat(name, &sbuf) < 0) return errno; /* * We want to match st_rdev if the path provided is a device diff --git a/libxfs/darwin.c b/libxfs/darwin.c index 19d2ab6e8..74507e816 100644 --- a/libxfs/darwin.c +++ b/libxfs/darwin.c @@ -27,13 +27,13 @@ int platform_has_uuid = 1; extern char *progname; int -platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) +platform_check_ismounted(char *name, char *block, struct stat *s, int verbose) { return 0; } int -platform_check_iswritable(char *name, char *block, struct stat64 *s) +platform_check_iswritable(char *name, char *block, struct stat *s) { int fd, writable; @@ -69,9 +69,9 @@ void platform_findsizes(char *path, int fd, long long *sz, int *bsz) { __uint64_t size; - struct stat64 st; + struct stat st; - if (fstat64(fd, &st) < 0) { + if (fstat(fd, &st) < 0) { fprintf(stderr, _("%s: cannot stat the device file \"%s\": %s\n"), progname, path, strerror(errno)); diff --git a/libxfs/freebsd.c b/libxfs/freebsd.c index 9e221831c..4667d1f58 100644 --- a/libxfs/freebsd.c +++ b/libxfs/freebsd.c @@ -27,14 +27,14 @@ int platform_has_uuid = 1; extern char *progname; int -platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) +platform_check_ismounted(char *name, char *block, struct stat *s, int verbose) { - struct stat64 st; + struct stat st; int cnt, i; struct statfs *fsinfo; if (!s) { - if (stat64(block, &st) < 0) + if (stat(block, &st) < 0) return 0; s = &st; } @@ -66,7 +66,7 @@ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) } int -platform_check_iswritable(char *name, char *block, struct stat64 *s) +platform_check_iswritable(char *name, char *block, struct stat *s) { int cnt, i; struct statfs *fsinfo; diff --git a/libxfs/init.c b/libxfs/init.c index 372158935..a08575a75 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -68,9 +68,9 @@ static struct dev_to_fd { static int check_isactive(char *name, char *block, int fatal) { - struct stat64 st; + struct stat st; - if (stat64(block, &st) < 0) + if (stat(block, &st) < 0) return 0; if ((st.st_mode & S_IFMT) != S_IFBLK) return 0; @@ -109,7 +109,7 @@ libxfs_device_open(char *path, int creat, int xflags, int setblksize) dev_t dev; int fd, d, flags; int readonly, dio, excl; - struct stat64 statb; + struct stat statb; readonly = (xflags & LIBXFS_ISREADONLY); excl = (xflags & LIBXFS_EXCLUSIVELY) && !creat; @@ -129,7 +129,7 @@ retry: exit(1); } - if (fstat64(fd, &statb) < 0) { + if (fstat(fd, &statb) < 0) { fprintf(stderr, _("%s: cannot stat %s: %s\n"), progname, path, strerror(errno)); exit(1); @@ -204,9 +204,9 @@ check_open(char *path, int flags, char **rawfile, char **blockfile) int readonly = (flags & LIBXFS_ISREADONLY); int inactive = (flags & LIBXFS_ISINACTIVE); int dangerously = (flags & LIBXFS_DANGEROUSLY); - struct stat64 stbuf; + struct stat stbuf; - if (stat64(path, &stbuf) < 0) { + if (stat(path, &stbuf) < 0) { perror(path); return 0; } diff --git a/libxfs/init.h b/libxfs/init.h index 4dda3ee37..2d8f23040 100644 --- a/libxfs/init.h +++ b/libxfs/init.h @@ -18,11 +18,11 @@ #ifndef LIBXFS_INIT_H #define LIBXFS_INIT_H -struct stat64; +struct stat; extern int platform_check_ismounted (char *path, char *block, - struct stat64 *sptr, int verbose); -extern int platform_check_iswritable (char *path, char *block, struct stat64 *sptr); + struct stat *sptr, int verbose); +extern int platform_check_iswritable (char *path, char *block, struct stat *sptr); extern int platform_set_blocksize (int fd, char *path, dev_t device, int bsz, int fatal); extern void platform_flush_device (int fd, dev_t device); extern char *platform_findrawpath(char *path); diff --git a/libxfs/irix.c b/libxfs/irix.c index c23ebe08d..32fcb3e5d 100644 --- a/libxfs/irix.c +++ b/libxfs/irix.c @@ -25,13 +25,13 @@ extern char *progname; extern __int64_t findsize(char *); int -platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) +platform_check_ismounted(char *name, char *block, struct stat *s, int verbose) { return 0; } int -platform_check_iswritable(char *name, char *block, struct stat64 *s) +platform_check_iswritable(char *name, char *block, struct stat *s) { return 1; } @@ -51,9 +51,9 @@ platform_flush_device(int fd, dev_t device) void platform_findsizes(char *path, int fd, long long *sz, int *bsz) { - struct stat64 st; + struct stat st; - if (fstat64(fd, &st) < 0) { + if (fstat(fd, &st) < 0) { fprintf(stderr, _("%s: cannot stat the device file \"%s\": %s\n"), progname, path, strerror(errno)); diff --git a/libxfs/linux.c b/libxfs/linux.c index dc5da51af..69f04ad95 100644 --- a/libxfs/linux.c +++ b/libxfs/linux.c @@ -53,16 +53,16 @@ static int max_block_alignment; #define CHECK_MOUNT_WRITABLE 0x2 static int -platform_check_mount(char *name, char *block, struct stat64 *s, int flags) +platform_check_mount(char *name, char *block, struct stat *s, int flags) { FILE *f; - struct stat64 st, mst; + struct stat st, mst; struct mntent *mnt; char mounts[MAXPATHLEN]; if (!s) { /* If either fails we are not mounted */ - if (stat64(block, &st) < 0) + if (stat(block, &st) < 0) return 0; if ((st.st_mode & S_IFMT) != S_IFBLK) return 0; @@ -78,7 +78,7 @@ platform_check_mount(char *name, char *block, struct stat64 *s, int flags) return 1; } while ((mnt = getmntent(f)) != NULL) { - if (stat64(mnt->mnt_dir, &mst) < 0) + if (stat(mnt->mnt_dir, &mst) < 0) continue; if (mst.st_dev != s->st_rdev) continue; @@ -109,7 +109,7 @@ _("%s: %s contains a mounted filesystem\n"), } int -platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) +platform_check_ismounted(char *name, char *block, struct stat *s, int verbose) { int flags; @@ -118,7 +118,7 @@ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) } int -platform_check_iswritable(char *name, char *block, struct stat64 *s) +platform_check_iswritable(char *name, char *block, struct stat *s) { int flags; @@ -146,11 +146,11 @@ platform_set_blocksize(int fd, char *path, dev_t device, int blocksize, int fata void platform_flush_device(int fd, dev_t device) { - struct stat64 st; + struct stat st; if (major(device) == RAMDISK_MAJOR) return; - if (fstat64(fd, &st) < 0) + if (fstat(fd, &st) < 0) return; if (S_ISREG(st.st_mode)) @@ -162,11 +162,11 @@ platform_flush_device(int fd, dev_t device) void platform_findsizes(char *path, int fd, long long *sz, int *bsz) { - struct stat64 st; + struct stat st; __uint64_t size; int error; - if (fstat64(fd, &st) < 0) { + if (fstat(fd, &st) < 0) { fprintf(stderr, _("%s: " "cannot stat the device file \"%s\": %s\n"), progname, path, strerror(errno)); diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c index a22efc27d..26d61ebbe 100644 --- a/mdrestore/xfs_mdrestore.c +++ b/mdrestore/xfs_mdrestore.c @@ -197,7 +197,7 @@ usage(void) exit(1); } -extern int platform_check_ismounted(char *, char *, struct stat64 *, int); +extern int platform_check_ismounted(char *, char *, struct stat *, int); int main( @@ -208,7 +208,7 @@ main( int dst_fd; int c; int open_flags; - struct stat64 statbuf; + struct stat statbuf; int is_target_file; progname = basename(argv[0]); @@ -244,7 +244,7 @@ main( /* check and open target */ open_flags = O_RDWR; is_target_file = 0; - if (stat64(argv[optind], &statbuf) < 0) { + if (stat(argv[optind], &statbuf) < 0) { /* ok, assume it's a file and create it */ open_flags |= O_CREAT; is_target_file = 1; diff --git a/mkfs/proto.c b/mkfs/proto.c index 1de77f82e..89cd23795 100644 --- a/mkfs/proto.c +++ b/mkfs/proto.c @@ -782,9 +782,9 @@ static long filesize( int fd) { - struct stat64 stb; + struct stat stb; - if (fstat64(fd, &stb) < 0) + if (fstat(fd, &stb) < 0) return -1; return (long)stb.st_size; } diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index fc565c0dd..8f73a42d8 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -810,7 +810,7 @@ check_device_type( bool force_overwrite, const char *optname) { - struct stat64 statbuf; + struct stat statbuf; if (*isfile && (no_size || no_name)) { fprintf(stderr, @@ -824,7 +824,7 @@ check_device_type( usage(); } - if (stat64(name, &statbuf)) { + if (stat(name, &statbuf)) { if (errno == ENOENT && *isfile) { if (create) *create = 1; diff --git a/po/de.po b/po/de.po index fc62525df..61a60f3ea 100644 --- a/po/de.po +++ b/po/de.po @@ -13873,8 +13873,8 @@ msgstr "%s: Dateien zum Kopieren müssen angegeben werden\n" #: .././rtcp/xfs_rtcp.c:86 #, c-format -msgid "%s: stat64 of %s failed\n" -msgstr "%s: stat64 von %s fehlgeschlagen\n" +msgid "%s: stat of %s failed\n" +msgstr "%s: stat von %s fehlgeschlagen\n" #: .././rtcp/xfs_rtcp.c:93 #, c-format @@ -13883,8 +13883,8 @@ msgstr "%s: letztes Argument ist kein Verzeichnis\n" #: .././rtcp/xfs_rtcp.c:140 #, c-format -msgid "%s: failed stat64 on %s: %s\n" -msgstr "%s: stat64 auf %s fehlgeschlagen: %s\n" +msgid "%s: failed stat on %s: %s\n" +msgstr "%s: stat auf %s fehlgeschlagen: %s\n" #: .././rtcp/xfs_rtcp.c:161 #, c-format diff --git a/po/pl.po b/po/pl.po index a950f7712..9d5128f17 100644 --- a/po/pl.po +++ b/po/pl.po @@ -13005,8 +13005,8 @@ msgstr "%s: trzeba podać pliki do skopiowania\n" #: .././rtcp/xfs_rtcp.c:84 #, c-format -msgid "%s: stat64 of %s failed\n" -msgstr "%s: stat64 na %s nie powiodło się\n" +msgid "%s: stat of %s failed\n" +msgstr "%s: stat na %s nie powiodło się\n" #: .././rtcp/xfs_rtcp.c:91 #, c-format @@ -13015,8 +13015,8 @@ msgstr "%s: ostatni argument nie jest katalogiem\n" #: .././rtcp/xfs_rtcp.c:138 #, c-format -msgid "%s: failed stat64 on %s: %s\n" -msgstr "%s: nie udało się wykonać stat64 na %s: %s\n" +msgid "%s: failed stat on %s: %s\n" +msgstr "%s: nie udało się wykonać stat na %s: %s\n" #: .././rtcp/xfs_rtcp.c:159 #, c-format diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c index 4d92b900a..d950a3206 100644 --- a/repair/xfs_repair.c +++ b/repair/xfs_repair.c @@ -676,9 +676,9 @@ main(int argc, char **argv) /* -f forces this, but let's be nice and autodetect it, as well. */ if (!isa_file) { int fd = libxfs_device_to_fd(x.ddev); - struct stat64 statbuf; + struct stat statbuf; - if (fstat64(fd, &statbuf) < 0) + if (fstat(fd, &statbuf) < 0) do_warn(_("%s: couldn't stat \"%s\"\n"), progname, fs_name); else if (S_ISREG(statbuf.st_mode)) diff --git a/rtcp/xfs_rtcp.c b/rtcp/xfs_rtcp.c index 3044350e7..705e9589c 100644 --- a/rtcp/xfs_rtcp.c +++ b/rtcp/xfs_rtcp.c @@ -35,7 +35,7 @@ int main(int argc, char **argv) { int c, i, r, errflg = 0; - struct stat64 s2; + struct stat s2; int extsize = - 1; progname = basename(argv[0]); @@ -80,8 +80,8 @@ main(int argc, char **argv) * which really exists. */ if (argc > 2) { - if (stat64(argv[argc-1], &s2) < 0) { - fprintf(stderr, _("%s: stat64 of %s failed\n"), + if (stat(argv[argc-1], &s2) < 0) { + fprintf(stderr, _("%s: stat of %s failed\n"), progname, argv[argc-1]); exit(2); } @@ -115,7 +115,7 @@ rtcp( char *source, char *target, int fextsize) int remove = 0, rtextsize; char *sp, *fbuf, *ptr; char tbuf[ PATH_MAX ]; - struct stat64 s1, s2; + struct stat s1, s2; struct fsxattr fsxattr; struct dioattr dioattr; @@ -134,8 +134,8 @@ rtcp( char *source, char *target, int fextsize) *sp = '\0'; } - if ( stat64(source, &s1) ) { - fprintf(stderr, _("%s: failed stat64 on %s: %s\n"), + if ( stat(source, &s1) ) { + fprintf(stderr, _("%s: failed stat on %s: %s\n"), progname, source, strerror(errno)); return( -1); } @@ -144,7 +144,7 @@ rtcp( char *source, char *target, int fextsize) * check for a realtime partition */ snprintf(tbuf, sizeof(tbuf), "%s", target); - if ( stat64(target, &s2) ) { + if ( stat(target, &s2) ) { if (!S_ISDIR(s2.st_mode)) { /* take out target file name */ if ((ptr = strrchr(tbuf, '/')) != NULL) @@ -165,14 +165,14 @@ rtcp( char *source, char *target, int fextsize) * check if target is a directory */ snprintf(tbuf, sizeof(tbuf), "%s", target); - if ( !stat64(target, &s2) ) { + if ( !stat(target, &s2) ) { if (S_ISDIR(s2.st_mode)) { snprintf(tbuf, sizeof(tbuf), "%s/%s", target, basename(source)); } } - if ( stat64(tbuf, &s2) ) { + if ( stat(tbuf, &s2) ) { /* * create the file if it does not exist */