]> granicus.if.org Git - strace/commitdiff
Cleanup struct stat.st_flags decoding
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 28 Dec 2014 17:44:13 +0000 (17:44 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 7 Jan 2015 22:05:38 +0000 (22:05 +0000)
There are no symbolic constants defined for struct stat.st_flags,
so decode this rare field as unsigned int.

* xlat/fileflags.in: Remove.
* file.c (realprintstat, printstat64) [HAVE_STRUCT_STAT_ST_FLAGS]:
Decode struct stat.st_flags as unsigned int.

file.c
xlat/fileflags.in [deleted file]

diff --git a/file.c b/file.c
index abc5c14402fd33a850aa6692140e070248f0ca38..ae1fdf1c9dc1db23956c7802ed769780cada44f3 100644 (file)
--- a/file.c
+++ b/file.c
@@ -372,8 +372,6 @@ printstat_powerpc32(struct tcb *tcp, long addr)
 }
 #endif /* POWERPC64 */
 
-#include "xlat/fileflags.h"
-
 static void
 realprintstat(struct tcb *tcp, struct stat *statbuf)
 {
@@ -417,8 +415,7 @@ realprintstat(struct tcb *tcp, struct stat *statbuf)
                tprintf("st_mtime=%s, ", sprinttime(statbuf->st_mtime));
                tprintf("st_ctime=%s", sprinttime(statbuf->st_ctime));
 #if HAVE_STRUCT_STAT_ST_FLAGS
-               tprints(", st_flags=");
-               printflags(fileflags, statbuf->st_flags, "UF_???");
+               tprintf(", st_flags=%u", statbuf->st_flags);
 #endif
 #if HAVE_STRUCT_STAT_ST_FSTYPE
                tprintf(", st_fstype=%.*s",
@@ -616,8 +613,7 @@ printstat64(struct tcb *tcp, long addr)
                tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
                tprintf("st_ctime=%s", sprinttime(statbuf.st_ctime));
 #if HAVE_STRUCT_STAT_ST_FLAGS
-               tprints(", st_flags=");
-               printflags(fileflags, statbuf.st_flags, "UF_???");
+               tprintf(", st_flags=%u", statbuf->st_flags);
 #endif
 #if HAVE_STRUCT_STAT_ST_FSTYPE
                tprintf(", st_fstype=%.*s",
diff --git a/xlat/fileflags.in b/xlat/fileflags.in
deleted file mode 100644 (file)
index e69de29..0000000