From 882e74b2191c059a9226cbd8bcb51c97da36247c Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Fri, 12 Jan 2024 20:39:21 -0500 Subject: rewrite file system layer --- include/mercury/kernel/fs/tarfs.hpp | 45 ------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 include/mercury/kernel/fs/tarfs.hpp (limited to 'include/mercury/kernel/fs/tarfs.hpp') diff --git a/include/mercury/kernel/fs/tarfs.hpp b/include/mercury/kernel/fs/tarfs.hpp deleted file mode 100644 index 64ee481..0000000 --- a/include/mercury/kernel/fs/tarfs.hpp +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef MERCURY_KERNEL_FS_TARFS_HPP -#define MERCURY_KERNEL_FS_TARFS_HPP - -#include - -namespace mercury::kernel::fs { - - class tarfs_instance : public storage::file_system_instance { - - private: - storage::block_device *bd; - - storage::io_result next_node(storage::node_id_t &node); - //name_buf must be at least 255 chars long. - storage::io_result read_name(storage::node_id_t node, char *name_buf, unsigned &name_len_out); - //len <= 12 - storage::io_result read_num(uint64_t offset, unsigned len, uint64_t &out); - - public: - tarfs_instance(storage::block_device *bd); - - storage::io_result get_root_node(storage::node_id_t &out) override; - storage::io_result get_first_child( - storage::node_id_t node, storage::node_id_t &out, storage::directory_iter_t &iter_out) override; - storage::io_result get_next_child( - storage::node_id_t node, storage::node_id_t &out, storage::directory_iter_t &iter) override; - storage::io_result get_child( - storage::node_id_t node, storage::node_id_t &out, const char *name, unsigned name_len) override; - storage::io_result get_name_length(storage::node_id_t node, unsigned &length_out) override; - storage::io_result get_name(storage::node_id_t node, char *buffer, unsigned &length_out) override; - storage::io_result get_file_length(storage::node_id_t node, uint64_t &length_out) override; - storage::io_result get_file_type(storage::node_id_t node, storage::file_type &out) override; - storage::io_result resize_file(storage::node_id_t node, uint64_t new_length) override; - storage::io_result read_bytes_from_file( - storage::node_id_t node, uint64_t start, uint64_t count, void *into) override; - storage::io_result write_bytes_into_file( - storage::node_id_t node, uint64_t start, uint64_t count, const void *from) override; - - }; - - storage::io_result tarfs_mounter(storage::block_device *bd, storage::file_system_instance *&fs_out); - -} - -#endif -- cgit v1.2.3