From 2928afe3b41bf96c98be59e802dd3655cd346aef Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 28 Dec 2014 17:44:13 +0000 Subject: [PATCH] Cleanup struct stat.st_flags decoding 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 | 8 ++------ xlat/fileflags.in | 0 2 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 xlat/fileflags.in diff --git a/file.c b/file.c index abc5c144..ae1fdf1c 100644 --- 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 index e69de29b..00000000 -- 2.40.0