From 7e2fe5029a803ae6a5a004fe3d3fed3fd9a033e7 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Mon, 15 Aug 2016 18:33:47 +0000 Subject: [PATCH] Drop support of dummy members of struct stat As st_flags, st_fstype, and st_gen members of struct stat are not filled by the kernel, there is no use supporting them. * configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_flags, struct stat.st_fstype, and struct stat.st_gen. * file.c [STAT32_PERSONALITY, HAVE_STRUCT_STAT64]: Do not undefine HAVE_STRUCT_STAT_ST_FLAGS, HAVE_STRUCT_STAT_ST_FSTYPE, and HAVE_STRUCT_STAT_ST_GEN. * printstat.h (DO_PRINTSTAT): Do not check for HAVE_STRUCT_STAT_ST_FLAGS, HAVE_STRUCT_STAT_ST_FSTYPE, and HAVE_STRUCT_STAT_ST_GEN. --- configure.ac | 3 --- file.c | 6 ------ printstat.h | 10 ---------- 3 files changed, 19 deletions(-) diff --git a/configure.ac b/configure.ac index d302afb4..0800f1f0 100644 --- a/configure.ac +++ b/configure.ac @@ -338,9 +338,6 @@ AC_CHECK_TYPES(m4_normalize([ AC_CHECK_MEMBERS(m4_normalize([ struct stat.st_atim.tv_nsec, struct stat.st_ctim.tv_nsec, - struct stat.st_flags, - struct stat.st_fstype, - struct stat.st_gen, struct stat.st_mtim.tv_nsec ])) diff --git a/file.c b/file.c index 123af466..2ff0ac7d 100644 --- a/file.c +++ b/file.c @@ -103,9 +103,6 @@ #ifdef STAT32_PERSONALITY # define DO_PRINTSTAT do_printstat32 # define STRUCT_STAT struct stat32 -# undef HAVE_STRUCT_STAT_ST_FLAGS -# undef HAVE_STRUCT_STAT_ST_FSTYPE -# undef HAVE_STRUCT_STAT_ST_GEN # include "printstat.h" #endif /* STAT32_PERSONALITY */ @@ -198,9 +195,6 @@ struct stat64 { # define DO_PRINTSTAT do_printstat64 # define STRUCT_STAT struct stat64 -# undef HAVE_STRUCT_STAT_ST_FLAGS -# undef HAVE_STRUCT_STAT_ST_FSTYPE -# undef HAVE_STRUCT_STAT_ST_GEN # include "printstat.h" static void diff --git a/printstat.h b/printstat.h index 0d139b45c..f7c42380 100644 --- a/printstat.h +++ b/printstat.h @@ -103,16 +103,6 @@ DO_PRINTSTAT(struct tcb *tcp, const STRUCT_STAT *statbuf) #ifdef HAVE_STRUCT_STAT_ST_CTIME_NSEC if (statbuf->st_ctime_nsec) tprintf(".%09lu", (unsigned long) statbuf->st_ctime_nsec); -#endif -#ifdef HAVE_STRUCT_STAT_ST_FLAGS - tprintf(", st_flags=%u", (unsigned int) statbuf->st_flags); -#endif -#ifdef HAVE_STRUCT_STAT_ST_FSTYPE - tprintf(", st_fstype=%.*s", - (int) sizeof statbuf->st_fstype, statbuf->st_fstype); -#endif -#ifdef HAVE_STRUCT_STAT_ST_GEN - tprintf(", st_gen=%u", (unsigned int) statbuf->st_gen); #endif } else { tprints(", ..."); -- 2.40.0