Services/FS: Stubbed GetSdmcArchiveResource and GetNandArchiveResource.

Also rewritten how GetArchiveResource works so that they all use the same interface.
We should decide what to do with these at some point.

Related to #3131 and #3110
This commit is contained in:
Subv
2020-04-15 16:38:37 -05:00
parent 9ae37da292
commit 783e7af5b2
4 changed files with 98 additions and 8 deletions

View File

@ -288,6 +288,16 @@ ResultCode ArchiveManager::CreateSystemSaveData(u32 high, u32 low) {
return RESULT_SUCCESS;
}
ResultVal<ArchiveResource> ArchiveManager::GetArchiveResource(MediaType media_type) const {
// TODO(Subv): Implement querying the actual size information for these storages.
ArchiveResource resource{};
resource.sector_size_in_bytes = 512;
resource.cluster_size_in_bytes = 16384;
resource.partition_capacity_in_clusters = 0x80000; // 8GiB capacity
resource.free_space_in_clusters = 0x80000; // 8GiB free
return MakeResult(resource);
}
void ArchiveManager::RegisterArchiveTypes() {
// TODO(Subv): Add the other archive types (see here for the known types:
// http://3dbrew.org/wiki/FS:OpenArchive#Archive_idcodes).