Filesystem services: Difference between revisions

 
(10 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]].


Web-applet loads the [[#FileSystemProxyType]] (which must be '''Manual''') from u32_table[inparam].
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,905: Line 1,921:
| 1 || IsHandleValid
| 1 || IsHandleValid
|-
|-
| 2 || OpenDetectionEvent
| 2 || [[#OpenDetectionEvent]]
|-
|-
| 3 || Returns an [[#IEventNotifier]].
| 3 || Returns an [[#IEventNotifier]].
|-
|-
| 10 || OpenOperator
| 10 || [[#OpenOperator]]
|-
|-
| 20 || OpenDevice
| 20 || [[#OpenDevice]]
|-
|-
| 21 || OpenStorage
| 21 || [[#OpenStorage]]
|-
|-
| 34 || Invalidate
| 34 || Invalidate
|}
|}
== OpenDetectionEvent ==
Returns an [[#IEventNotifier]].
== OpenOperator ==
Returns an [[#IStorageDeviceOperator]].
== OpenDevice ==
Returns an [[#IStorageDevice]].
== OpenStorage ==
Returns an [[#IStorage]].


= IStorageDeviceOperator =
= IStorageDeviceOperator =
Line 1,939: Line 1,966:


= 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,945: Line 1,972:
! Cmd || Name
! Cmd || Name
|-
|-
| N/A || GetHandle
| 0 || GetHandle
|-
|-
| N/A || IsHandleValid
| 1 || IsHandleValid
|-
|-
| N/A || OpenOperator
| 10 || OpenOperator
|-
|-
| N/A || Read
| 20 || Read
|-
|-
| N/A || Write
| 21 || Write
|-
|-
| N/A || Flush
| 22 || Flush
|-
|-
| N/A || SetSize
| 23 || SetSize
|-
|-
| N/A || GetSize
| 24 || GetSize
|-
|-
| N/A || OperateRange
| 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,016: Line 2,045:
|-
|-
| 0 || None
| 0 || None
|-
| 1 || [S2]
|-
|-
| 15 || All
| 15 || All