Filesystem services: Difference between revisions
| (13 intermediate revisions by 3 users not shown) | |||
| Line 133: | Line 133: | ||
|- | |- | ||
| 38 || [20.0.0+] DetachSdCard | | 38 || [20.0.0+] DetachSdCard | ||
|- | |||
| 39 || [21.0.0+] ShutdownStorage | |||
|- | |||
| 40 || [21.0.0+] FixSaveDataCertificate | |||
|- | |- | ||
| 51 || [[#OpenSaveDataFileSystem]] | | 51 || [[#OpenSaveDataFileSystem]] | ||
| Line 183: | Line 187: | ||
|- | |- | ||
| 87 || [11.0.0+] [[#OpenSaveDataTransferManagerForRepair]] | | 87 || [11.0.0+] [[#OpenSaveDataTransferManagerForRepair]] | ||
|- | |||
| 88 || [21.0.0+] OpenSaveDataTransferManagerForSaveDataRepairWithPolicy | |||
|- | |- | ||
| 100 || OpenImageDirectoryFileSystem | | 100 || OpenImageDirectoryFileSystem | ||
| Line 275: | Line 281: | ||
|- | |- | ||
| 640 || [4.0.0-7.0.1] IsSignedSystemPartitionOnSdCardValid | | 640 || [4.0.0-7.0.1] IsSignedSystemPartitionOnSdCardValid | ||
|- | |||
| 650 || [S2] | |||
|- | |- | ||
| 651 || [S2] | | 651 || [S2] | ||
| Line 290: | Line 298: | ||
| 720 || [5.0.0+] AbandonAccessFailure | | 720 || [5.0.0+] AbandonAccessFailure | ||
|- | |- | ||
| 800 || [2.0.0+] GetAndClearErrorInfo | | 800 || [2.0.0+] [[#GetAndClearErrorInfo]] | ||
|- | |- | ||
| 810 || [7.0.0+] RegisterProgramIndexMapInfo | | 810 || [7.0.0+] RegisterProgramIndexMapInfo | ||
| Line 659: | Line 667: | ||
Takes an input [[#FileSystemProxyType]] and an input [[NCM_services#ProgramId|ProgramId]]. Returns an [[#IFileSystem]]. | Takes an input [[#FileSystemProxyType]] and an input [[NCM_services#ProgramId|ProgramId]]. Returns an [[#IFileSystem]]. | ||
The [[#FileSystemProxyType]] must be '''Manual'''. | |||
Note: web-applet strings refer to both this cmd and [[#OpenFileSystemWithId]] as "MountContent", but official nn_sf_sync symbols use "OpenXX" names. | Note: web-applet strings refer to both this cmd and [[#OpenFileSystemWithId]] as "MountContent", but official nn_sf_sync symbols use "OpenXX" names. | ||
| Line 835: | Line 843: | ||
[8.0.0+] Now takes an additional 8-bytes of input. | [8.0.0+] Now takes an additional 8-bytes of input. | ||
== GetAndClearErrorInfo == | |||
[21.0.0+] Now takes a type-0x1A output buffer and no longer returns 0x80-bytes of output. | |||
== SetSaveDataSize == | == SetSaveDataSize == | ||
| Line 1,591: | Line 1,602: | ||
| 16 || [[#SetKeySeedPackage]] | | 16 || [[#SetKeySeedPackage]] | ||
|- | |- | ||
| 17 || [20.0.0+] SetLocalKeySeedPackage | | 17 || [20.0.0+] [[#SetLocalKeySeedPackage|SetLocalKeySeedPackage]] | ||
|- | |- | ||
| 32 || [[#OpenSaveDataExporter]] | | 32 || [[#OpenSaveDataExporter]] | ||
| Line 1,623: | Line 1,634: | ||
== SetKeySeedPackage == | == SetKeySeedPackage == | ||
No input/output, takes a type-0x5 input buffer containing the '''KeySeedPackage'''. | No input/output, takes a type-0x5 input buffer containing the '''KeySeedPackage'''. | ||
== SetLocalKeySeedPackage == | |||
No input/output, takes a type-0x5 input buffer. | |||
This can only be used after [[#SetKeySeedPackage]], in certain conditions. | |||
== OpenSaveDataExporter == | == OpenSaveDataExporter == | ||
| Line 1,895: | Line 1,911: | ||
= IStorageDeviceManager = | = IStorageDeviceManager = | ||
This is "nn::fssrv::storage::sf::IStorageDeviceManager". | [S2] This is "nn::fssrv::storage::sf::IStorageDeviceManager". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
| Line 1,901: | Line 1,917: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| | | 0 || IsInserted | ||
|- | |||
| 1 || IsHandleValid | |||
|- | |- | ||
| | | 2 || [[#OpenDetectionEvent]] | ||
|- | |- | ||
| | | 3 || Returns an [[#IEventNotifier]]. | ||
|- | |- | ||
| | | 10 || [[#OpenOperator]] | ||
|- | |- | ||
| | | 20 || [[#OpenDevice]] | ||
|- | |- | ||
| | | 21 || [[#OpenStorage]] | ||
|- | |- | ||
| | | 34 || Invalidate | ||
|} | |} | ||
== OpenDetectionEvent == | |||
Returns an [[#IEventNotifier]]. | |||
== OpenOperator == | |||
Returns an [[#IStorageDeviceOperator]]. | |||
== OpenDevice == | |||
Returns an [[#IStorageDevice]]. | |||
== OpenStorage == | |||
Returns an [[#IStorage]]. | |||
= IStorageDeviceOperator = | = IStorageDeviceOperator = | ||
This is "nn::fssrv::storage::sf::IStorageDeviceOperator". | [S2] This is "nn::fssrv::storage::sf::IStorageDeviceOperator". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
| Line 1,923: | Line 1,952: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| | | 0 || Operate | ||
|- | |- | ||
| | | 1 || OperateIn | ||
|- | |- | ||
| | | 10 || OperateOut | ||
|- | |- | ||
| | | 11 || OperateOut2 | ||
|- | |- | ||
| | | 20 || OperateInOut | ||
|- | |- | ||
| | | 21 || OperateIn2Out | ||
|} | |} | ||
= IStorageDevice = | = IStorageDevice = | ||
This is "nn::fssrv::storage::sf::IStorageDevice". | [S2] This is "nn::fssrv::storage::sf::IStorageDevice". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
| Line 1,943: | Line 1,972: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| | | 0 || GetHandle | ||
|- | |- | ||
| | | 1 || IsHandleValid | ||
|- | |- | ||
| | | 10 || OpenOperator | ||
|- | |- | ||
| | | 20 || Read | ||
|- | |- | ||
| | | 21 || Write | ||
|- | |- | ||
| | | 22 || Flush | ||
|- | |- | ||
| | | 23 || SetSize | ||
|- | |- | ||
| | | 24 || GetSize | ||
|- | |- | ||
| | | 25 || OperateRange | ||
|} | |} | ||
= FileSystemProxyType = | = FileSystemProxyType = | ||
This is "nn::fs::FileSystemProxyType". | This is "nn::fs::FileSystemProxyType". | ||
sdknso converts the input [[#ContentType|ContentType]] to a FileSystemProxyType, for use with the cmd input. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
| Line 2,014: | Line 2,045: | ||
|- | |- | ||
| 0 || None | | 0 || None | ||
|- | |||
| 1 || [S2] | |||
|- | |- | ||
| 15 || All | | 15 || All | ||