diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-11-27 12:45:53 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-02-05 10:17:04 +0100 |
commit | 03fcbb15d24e2eec41bac9f5dee30bbf7dc888b8 (patch) | |
tree | ce9f909c5a3a4ef34dba010f9b8cfafa0fa52eb4 /cpukit/libfs/src/dosfs | |
parent | 9399473cb83985fd222e299e4581a232f5d35028 (diff) |
fs: Add struct dirent::d_type support
Diffstat (limited to 'cpukit/libfs/src/dosfs')
-rw-r--r-- | cpukit/libfs/src/dosfs/msdos_dir.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_dir.c b/cpukit/libfs/src/dosfs/msdos_dir.c index a13caafa7e..fee6491c7d 100644 --- a/cpukit/libfs/src/dosfs/msdos_dir.c +++ b/cpukit/libfs/src/dosfs/msdos_dir.c @@ -236,6 +236,17 @@ msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count) continue; } +#ifdef DT_DIR + if ((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_DIRECTORY) + { + tmp_dirent.d_type = DT_DIR; + } + else + { + tmp_dirent.d_type = DT_REG; + } +#endif + /* * Move the entry to the return buffer * |