From 69cf28db0dfa175884c9c41fc3f329b051e0a9c5 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 14 May 2023 17:00:33 +0200 Subject: libio: remove device number from dir_iterator_t, add flag field Signed-off-by: David Oberhollenzer --- include/io/dir_iterator.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'include/io') diff --git a/include/io/dir_iterator.h b/include/io/dir_iterator.h index b7212b3..0de135a 100644 --- a/include/io/dir_iterator.h +++ b/include/io/dir_iterator.h @@ -10,6 +10,12 @@ #include "sqfs/predef.h" #include "io/istream.h" +typedef enum { + DIR_ENTRY_FLAG_MOUNT_POINT = 0x0001, + + DIR_ENTRY_FLAG_HARD_LINK = 0x0002, +} DIR_ENTRY_FLAG; + /** * @struct dir_entry_t * @@ -60,6 +66,11 @@ typedef struct { */ sqfs_u16 mode; + /** + * @brief Combination of DIR_ENTRY_FLAG values + */ + sqfs_u16 flags; + /** * @brief Name of the entry * @@ -77,19 +88,6 @@ typedef struct { typedef struct dir_iterator_t { sqfs_object_t obj; - /** - * @brief A device number for detecting mount points and hard links. - * - * On Unix-like systems this exposes the underlying device number - * backing this directory. Each entry returned by the iterator also - * has a device number and if it is different, you found a mount point. - * - * The device number, combined with inode number, are also needed to - * detect hard links. Entries with same device and inode number point - * to the same file. - */ - sqfs_u64 dev; - /** * @brief Read the next entry and update internal state relating to it * -- cgit v1.2.3