]> granicus.if.org Git - strace/commitdiff
Drop support of dummy members of struct stat
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 15 Aug 2016 18:33:47 +0000 (18:33 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 15 Aug 2016 19:09:24 +0000 (19:09 +0000)
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
file.c
printstat.h

index d302afb4c4bf99fdca40eb97dae25c97333a328a..0800f1f01d9e96de48696e5c1e8f1a8b43bfdc20 100644 (file)
@@ -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 123af4660a77caeb6a9e6ebc176530d026385002..2ff0ac7d47754cac0a8c4c5d8a48237ec8729a0e 100644 (file)
--- a/file.c
+++ b/file.c
 #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
index 0d139b45cecc031cdd799a40438ef8619f03a549..f7c4238066c6aa0203f86a223601b3bd189ac666 100644 (file)
@@ -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(", ...");