[syslinux:pathbased] dirent.h: types for the d_type field
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Sat Mar 6 14:54:14 PST 2010
Commit-ID: 8fc99886a6f922a5d4ec105cfd72cd70f5b67d8d
Gitweb: http://syslinux.zytor.com/commit/8fc99886a6f922a5d4ec105cfd72cd70f5b67d8d
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sat, 6 Mar 2010 14:50:20 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Sat, 6 Mar 2010 14:50:20 -0800
dirent.h: types for the d_type field
Add an enum for the DT_* constants for the d_type field.
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
com32/include/sys/dirent.h | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/com32/include/sys/dirent.h b/com32/include/sys/dirent.h
index a7f26e4..0a27c66 100644
--- a/com32/include/sys/dirent.h
+++ b/com32/include/sys/dirent.h
@@ -19,9 +19,19 @@ struct dirent {
char d_name[NAME_MAX + 1];
};
+enum dirent_types {
+ DT_UNKNOWN = 0,
+ DT_FIFO = 1,
+ DT_CHR = 2,
+ DT_DIR = 4,
+ DT_BLK = 6,
+ DT_REG = 8,
+ DT_LNK = 10,
+ DT_SOCK = 12,
+ DT_WHT = 14,
+};
+
struct _DIR_;
typedef struct _DIR_ DIR;
-#define DIR_REC_LEN(name) (12 + strlen(name) + 1 + 3) & ~3
-
#endif /* sys/dirent.h */
More information about the Syslinux-commits
mailing list