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.
This commit is contained in:
Дмитрий Левин 2016-08-15 18:33:47 +00:00
parent 18cac625e5
commit 7e2fe5029a
3 changed files with 0 additions and 19 deletions

View 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
]))

6
file.c
View File

@ -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

View 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(", ...");