From de20d7430df08731d9108acb83e1234ba7f1fe16 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sat, 19 Sep 2020 14:53:29 -0400 Subject: file manager --- src/kernel/drive.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/kernel/drive.h') diff --git a/src/kernel/drive.h b/src/kernel/drive.h index b02b4ad..03fe4b6 100644 --- a/src/kernel/drive.h +++ b/src/kernel/drive.h @@ -13,10 +13,11 @@ typedef uint8_t drive_id_t; #define DCI_NAME_LEN 100 struct directory_content_info { - bool is_dir; char name[DCI_NAME_LEN]; uint32_t size; -}; + bool is_dir; + uint8_t pad[23]; +} __attribute__ ((packed)); struct drive { char *drive_type; @@ -34,6 +35,7 @@ struct drive { void (*load_sector) (const struct drive *d, file_id_t fid, uint32_t sector, void *at); uint32_t (*get_file_length) (const struct drive *d, file_id_t fid); uint32_t (*enumerate_dir) (const struct drive *d, const char *path, struct directory_content_info *info, uint32_t max); + uint32_t (*n_dir_entries) (const struct drive *d, const char *path); uint32_t (*get_free_sectors)(const struct drive *d); fs_id_t fs_id; }; -- cgit v1.2.3