fatfs: use devoptab mounting. devoptab: add config for hidding from fs and dump, fix http being writeable.

This commit is contained in:
ITotalJustice
2025-09-07 17:35:37 +01:00
parent ba78fd0dc5
commit 61b398a89a
12 changed files with 332 additions and 292 deletions

View File

@@ -134,6 +134,8 @@ struct MountConfig {
bool read_only{};
bool no_stat_file{true};
bool no_stat_dir{true};
bool fs_hidden{};
bool dump_hidden{};
std::unordered_map<std::string, std::string> extra{};
};
@@ -212,6 +214,9 @@ private:
};
using CreateDeviceCallback = std::function<std::unique_ptr<MountDevice>(const MountConfig& config)>;
Result MountNetworkDevice(const CreateDeviceCallback& create_device, size_t file_size, size_t dir_size, const char* name);
Result MountNetworkDevice(const CreateDeviceCallback& create_device, size_t file_size, size_t dir_size, const char* name, bool force_read_only = false);
// same as above but takes in the device and expects the mount name to be set.
bool MountNetworkDevice2(std::unique_ptr<MountDevice>&& device, const MountConfig& config, size_t file_size, size_t dir_size, const char* name, const char* mount_name);
} // namespace sphaira::devoptab::common