mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-03 16:18:51 -04:00
stratosphere-except-ldr: use fs bindings (this temporarily breaks loader)
This commit is contained in:
parent
4eb3109c93
commit
6eee3f5fe7
17 changed files with 283 additions and 187 deletions
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include <stratosphere/os.hpp>
|
||||
#include <stratosphere/fs/fs_directory.hpp>
|
||||
#include <stratosphere/kvdb/kvdb_bounded_string.hpp>
|
||||
|
||||
namespace ams::kvdb {
|
||||
|
@ -23,12 +24,11 @@ namespace ams::kvdb {
|
|||
NON_COPYABLE(FileKeyValueStore);
|
||||
NON_MOVEABLE(FileKeyValueStore);
|
||||
public:
|
||||
static constexpr size_t MaxPathLength = 0x300; /* TODO: FS_MAX_PATH - 1? */
|
||||
static constexpr size_t MaxFileLength = 0xFF;
|
||||
static constexpr char FileExtension[5] = ".val";
|
||||
static constexpr size_t FileExtensionLength = sizeof(FileExtension) - 1;
|
||||
static constexpr size_t MaxKeySize = (MaxFileLength - FileExtensionLength) / 2;
|
||||
using Path = kvdb::BoundedString<MaxPathLength>;
|
||||
using Path = kvdb::BoundedString<fs::EntryNameLengthMax>;
|
||||
using FileName = kvdb::BoundedString<MaxFileLength>;
|
||||
private:
|
||||
/* Subtypes. */
|
||||
|
|
|
@ -15,8 +15,9 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <stratosphere/fs/fs_filesystem.hpp>
|
||||
#include <stratosphere/fs/fs_file.hpp>
|
||||
#include <stratosphere/fs/fs_directory.hpp>
|
||||
#include <stratosphere/fs/fs_filesystem.hpp>
|
||||
#include <stratosphere/kvdb/kvdb_auto_buffer.hpp>
|
||||
#include <stratosphere/kvdb/kvdb_archive.hpp>
|
||||
#include <stratosphere/kvdb/kvdb_bounded_string.hpp>
|
||||
|
@ -252,8 +253,7 @@ namespace ams::kvdb {
|
|||
}
|
||||
};
|
||||
private:
|
||||
static constexpr size_t MaxPathLen = 0x300; /* TODO: FS_MAX_PATH - 1? */
|
||||
using Path = kvdb::BoundedString<MaxPathLen>;
|
||||
using Path = kvdb::BoundedString<fs::EntryNameLengthMax>;
|
||||
private:
|
||||
Index index;
|
||||
Path path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue