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> | 2018-12-15 09:48:35 +0100 |
commit | ec228ee135cc645fa08307c15466a801c18f407b (patch) | |
tree | 857f7dedec709277c4953563d79b65150029f2d1 | |
parent | beb1f94bda02e6f8a2c2370adbbecb2eb1e8b85c (diff) |
dosfs: Add dirent::d_type support
-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 * |