@@ -641,7 +641,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();
@@ -514,7 +514,7 @@ fsrallfs(char *mtab, int howlong, char *leftofffile)
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)
@@ -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;
@@ -142,7 +142,6 @@ typedef u_int32_t xfs_dev_t;
typedef int64_t xfs_daddr_t;
#define stat64 stat
-#define fstat64 fstat
#define lseek64 lseek
#define pread64 pread
#define pwrite64 pwrite
@@ -34,7 +34,6 @@
#define __LITTLE_ENDIAN LITTLE_ENDIAN
/* FreeBSD file API is 64-bit aware */
-#define fstat64 fstat
#define ftruncate64 ftruncate
#define lseek64 lseek
#define stat64 stat
@@ -62,8 +62,8 @@ copy_src_filesize(int fd)
{
struct stat64 st;
- if (fstat64(fd, &st) < 0) {
- perror("fstat64");
+ if (fstat(fd, &st) < 0) {
+ perror("fstat");
return -1;
};
return st.st_size;
@@ -54,8 +54,8 @@ filesize(void)
{
struct stat64 st;
- if (fstat64(file->fd, &st) < 0) {
- perror("fstat64");
+ if (fstat(file->fd, &st) < 0) {
+ perror("fstat");
return -1;
}
return st.st_size;
@@ -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));
@@ -576,8 +576,8 @@ set_extsize(const char *path, int fd, long extsz)
struct fsxattr fsx;
struct stat64 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) {
@@ -135,8 +135,8 @@ sendfile_f(
} else {
struct stat64 stat;
- if (fstat64(fd, &stat) < 0) {
- perror("fstat64");
+ if (fstat(fd, &stat) < 0) {
+ perror("fstat");
goto done;
}
count = stat.st_size;
@@ -71,7 +71,7 @@ platform_findsizes(char *path, int fd, long long *sz, int *bsz)
__uint64_t size;
struct stat64 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));
@@ -124,7 +124,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);
@@ -53,7 +53,7 @@ platform_findsizes(char *path, int fd, long long *sz, int *bsz)
{
struct stat64 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));
@@ -129,7 +129,7 @@ platform_flush_device(int fd, dev_t device)
if (major(device) == RAMDISK_MAJOR)
return;
- if (fstat64(fd, &st) < 0)
+ if (fstat(fd, &st) < 0)
return;
if (S_ISREG(st.st_mode))
@@ -145,7 +145,7 @@ platform_findsizes(char *path, int fd, long long *sz, int *bsz)
__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));
@@ -784,7 +784,7 @@ filesize(
{
struct stat64 stb;
- if (fstat64(fd, &stb) < 0)
+ if (fstat(fd, &stb) < 0)
return -1;
return (long)stb.st_size;
}
@@ -670,7 +670,7 @@ main(int argc, char **argv)
int fd = libxfs_device_to_fd(x.ddev);
struct stat64 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))
Signed-off-by: Felix Janda <felix.janda@posteo.de> --- copy/xfs_copy.c | 2 +- fsr/xfs_fsr.c | 4 ++-- include/darwin.h | 1 - include/freebsd.h | 1 - io/copy_file_range.c | 4 ++-- io/open.c | 12 ++++++------ io/sendfile.c | 4 ++-- libxfs/darwin.c | 2 +- libxfs/init.c | 2 +- libxfs/irix.c | 2 +- libxfs/linux.c | 4 ++-- mkfs/proto.c | 2 +- repair/xfs_repair.c | 2 +- 13 files changed, 20 insertions(+), 22 deletions(-)