mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-18 16:32:05 +00:00
fs: move file storage to common
This commit is contained in:
parent
7548940efa
commit
5ef93778f6
4 changed files with 4 additions and 4 deletions
|
@ -35,7 +35,7 @@
|
||||||
#include <stratosphere/fs/fs_substorage.hpp>
|
#include <stratosphere/fs/fs_substorage.hpp>
|
||||||
#include <stratosphere/fs/fs_memory_storage.hpp>
|
#include <stratosphere/fs/fs_memory_storage.hpp>
|
||||||
#include <stratosphere/fs/fs_remote_storage.hpp>
|
#include <stratosphere/fs/fs_remote_storage.hpp>
|
||||||
#include <stratosphere/fs/fs_file_storage.hpp>
|
#include <stratosphere/fs/common/fs_file_storage.hpp>
|
||||||
#include <stratosphere/fs/fs_query_range.hpp>
|
#include <stratosphere/fs/fs_query_range.hpp>
|
||||||
#include <stratosphere/fs/fs_speed_emulation.hpp>
|
#include <stratosphere/fs/fs_speed_emulation.hpp>
|
||||||
#include <stratosphere/fs/impl/fs_common_mount_name.hpp>
|
#include <stratosphere/fs/impl/fs_common_mount_name.hpp>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <stratosphere/fs/fs_file_storage.hpp>
|
#include <stratosphere/fs/common/fs_file_storage.hpp>
|
||||||
#include <stratosphere/ncm/ncm_package_install_task.hpp>
|
#include <stratosphere/ncm/ncm_package_install_task.hpp>
|
||||||
|
|
||||||
namespace ams::ncm {
|
namespace ams::ncm {
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace ams::fs {
|
||||||
|
|
||||||
Result FileStorage::UpdateSize() {
|
Result FileStorage::UpdateSize() {
|
||||||
R_SUCCEED_IF(this->size != InvalidSize);
|
R_SUCCEED_IF(this->size != InvalidSize);
|
||||||
return this->base_file->GetSize(&this->size);
|
return this->base_file->GetSize(std::addressof(this->size));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result FileStorage::Read(s64 offset, void *buffer, size_t size) {
|
Result FileStorage::Read(s64 offset, void *buffer, size_t size) {
|
||||||
|
@ -36,7 +36,7 @@ namespace ams::fs {
|
||||||
R_UNLESS(IStorage::CheckAccessRange(offset, size, this->size), fs::ResultOutOfRange());
|
R_UNLESS(IStorage::CheckAccessRange(offset, size, this->size), fs::ResultOutOfRange());
|
||||||
|
|
||||||
size_t read_size;
|
size_t read_size;
|
||||||
return this->base_file->Read(&read_size, offset, buffer, size);
|
return this->base_file->Read(std::addressof(read_size), offset, buffer, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result FileStorage::Write(s64 offset, const void *buffer, size_t size) {
|
Result FileStorage::Write(s64 offset, const void *buffer, size_t size) {
|
Loading…
Reference in a new issue