From 4054284e29aeeb7ab8495ecb27000f0301047f7c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Jan 2004 09:47:49 +0000 Subject: [PATCH] 2004-01-13 Roland McGrath * file.c (direnttypes): Define under [LINUX] as well. Add DT_UNKNOWN. (sys_getdents64) [LINUX]: Print d_type field. --- file.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/file.c b/file.c index 5ab057ca..d03c01b0 100644 --- a/file.c +++ b/file.c @@ -1903,8 +1903,9 @@ struct tcb *tcp; #endif /* LINUX */ -#ifdef FREEBSD +#if defined FREEBSD || defined LINUX struct xlat direnttypes[] = { + { DT_UNKNOWN, "DT_UNKNOWN" }, { DT_FIFO, "DT_FIFO" }, { DT_CHR, "DT_CHR" }, { DT_DIR, "DT_DIR" }, @@ -2036,6 +2037,11 @@ struct tcb *tcp; i ? " " : "", (unsigned long)d->d_ino, (unsigned long)d->d_off); +#ifdef LINUX + tprintf("d_type="); + printxval(direnttypes, d->d_type, "DT_???"); + tprintf(", "); +#endif tprintf("d_reclen=%u, d_name=\"%s\"}", d->d_reclen, d->d_name); } -- 2.40.0