diff mbox

[xfsprogs,04/14] replace lstat64 by equivalent lstat

Message ID 903a519209407e8815607e741bf24027b07408ca.1470555003.git.felix.janda@posteo.de (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Felix Janda Aug. 6, 2016, 10:45 a.m. UTC
Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 fsr/xfs_fsr.c    | 4 ++--
 include/darwin.h | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Christoph Hellwig Aug. 9, 2016, 7:37 a.m. UTC | #1
Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

if for some reasons this has to be respun and reposted I'd do all
calls of a family (e.g. stat/lstat/fstat) in one patch, though.
diff mbox

Patch

diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 2eaf1e7..6099dc2 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -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));
@@ -510,7 +510,7 @@  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);
 		}
diff --git a/include/darwin.h b/include/darwin.h
index 1666294..6d24957 100644
--- a/include/darwin.h
+++ b/include/darwin.h
@@ -222,7 +222,6 @@  static inline int timer_gettime (timer_t timerid, struct itimerspec *value)
 #include <sys/ucred.h>
 #include <errno.h>
 #define statvfs64 statfs
-#define lstat64 lstat
 #define		_PATH_MOUNTED   "/etc/mtab"
 
 struct mntent