nn::fs::MountSaveData Function

Syntax

Result MountSaveData(
     const char * archiveName = "data:"
);

Arguments

Name Description
in archiveName Specifies the name of the archive. (If this argument is omitted, "data:" is specified.)

Return Values

Returns the result of the operation.
Value Description
Success. Process was successful. The return value's IsSuccess function returns true in this state.
ResultAlreadyExists The specified archive name is already mounted.
You must not allow this error to occur in retail products.
ResultOperationDenied Operation denied because save data is currently mounting.
You must not allow this error to occur in retail products.
ResultNotFormatted Data region not formatted. Format it by calling the FormatSaveData function.
ResultBadFormat Data region format invalid. Format it by calling the FormatSaveData function.
ResultVerificationFailed Either verification failed or some form of tampering was detected. Format it by calling the FormatSaveData function.
A value other than the above. An application bug or some other unexpected error.

Description

Mounts a save data archive.

Mounts an application-specific save data region and gives it the specified archive name. The save data region must be formatted before it can be used.

Be sure to check the return value when you call this function to determine whether the save data region is invalid. If the save data region is invalid, call the FormatSaveData function to initialize it. Call this function again afterwards to mount it.

The following page has hints on how to handle mount errors. Please use this as a reference.

Double Mounting

When save data are mounted a second time, the correct behavior is for there to be an error and for the function to return nn::fs::ResultOperationDenied. However, because of a bug, different versions of the CTR-SDK will return different results.

SDK versionReturn Values
Version 1.2 or earlierReturns success.
Versions 1.3 to 1.XReturns nn::fs::ResultOperationDenied.
Versions 2.0 to 2.2Returns nn::fs::ResultAccessDenied.
Version 2.3 or laterReturns nn::fs::ResultOperationDenied.

In CTR-SDK versions 1.2 and earlier, success is returned, however, double mounting is not supported. Do not mount twice because there is a risk of corrupting the save data when writing and performing other operations.

Revision History

2011/04/15
Added the section Double Mounting.
2011/04/13
Added the return value ResultOperationDenied.
2010/12/15
Added a link to the error handling page.
2010/08/16
Initial version.

CONFIDENTIAL