SAVERollbackQuota / SAVERollbackQuotaAsync

Syntax

#include <nn/save.h>

FSStatus            SAVERollbackQuota(
                        FSClient                *client,
                        FSCmdBlock              *block,
                        u8                      accountSlotNo,
                        FSRetFlag               errHandling
                        );
FSStatus            SAVERollbackQuotaAsync(
                        FSClient                *client,
                        FSCmdBlock              *block,
                        u8                      accountSlotNo,
                        FSRetFlag               errHandling,
                        const FSAsyncParams     *asyncParams
                        );

Parameters

client Pointer to the client buffer.
block Command block.
accountSlotNo The user account slot number.
errHandling Automatic error handling flag. Only the indicated error is returned.
asyncParams (Async API only) Notification parameters for an asynchronous call.

Return Values

Synchronous API: Return Value; Asynchronous API: Callback Return Value

FS_STATUS_OK Successfully completed.
FS_STATUS_CANCELED The command was canceled.
FS_STATUS_NOT_FOUND Target not found.
or
The specified user account does not exist on this Wii U console.
FS_STATUS_ALREADY_OPEN There is one or more open file or directory in the quota.
FS_STATUS_UNSUPPORTED_CMD The associated file system does not support this function.
FS_STATUS_MEDIA_NOT_READY (Only for manually mounted devices) Media is not present.
FS_STATUS_MEDIA_ERROR (Only for manually mounted devices) Media is in some inaccessible condition.
FS_STATUS_DATA_CORRUPTED (Only for manually mounted devices) The data is corrupted beyond repair. The volume needs format.

Async API: Immediate Return Values

FS_STATUS_OK Successfully issued the request.
FS_STATUS_NOT_FOUND The user account was not found on this console.
FS_STATUS_FATAL_ERROR The argument is invalid.

Description

Discards uncommitted changes in the quota of the specified save directory.

All operations by the FS and SAVE APIs are recorded as transactions by journaling. Calling SAVEFlushQuota atomically commits all of the operations in the transaction.

If this function is called or an unexpected shutdown occurs, all the transaction data in the save directory is lost. The game's save data is rolled back to the state it was in after the previous flush.

Both the sync and async style API functions are provided. To use the async API functions, set the user callback and parameters in notificationParams. For more information, see FSAsyncParams.

This function can be used with file systems that support journaling feature. On the other file systems, this function returns the error FS_STATUS_UNSUPPORTED_CMD. PCFS, a host PC file system, does not support the journaling feature.

NOTE:
The relativePath argument was deprecated because this function rolls back save directories regardless of relativePath argument.

Do Not Call From

SAVERollbackQuota

None.

SAVERollbackQuotaAsync

None.

Revision History

2014/10/22 Revised the return values.
2013/05/08 Automated cleanup pass.
2012/10/01 Revised the return values.
2012/06/14 Corrected links.
2012/06/08 Deprecated the relativePath argument.
2012/03/29 Initial version.


CONFIDENTIAL