ctr_firmware/trunk/firmware/include/firm/nfs/revolution/wfsError.h
(no author) 080e5d5613 (shirait) nfs(wiifs)ライブラリ追加
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@283 b871894f-2f95-9b40-918c-086798483c85
2009-02-13 00:26:03 +00:00

99 lines
6.1 KiB
C

/*---------------------------------------------------------------------------*
Project: Revolution WFS library
File: wfserror.h
Copyright 2007-2008 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Log: wfsError.h,v $
Revision 1.6 2008/09/26 12:04:33 ueno
Changed WFS_RESULT_* to be equal to WFSKRN_RESULT_* to guarantee the casts.
Revision 1.5 2008/07/11 19:02:21 paul
Removed WFS_RESULT_DIRECTORY_FULL. Fixed comments and reordered slightly.
Revision 1.4 2008/07/10 07:03:19 nakanose_jin
add permissions API
Revision 1.3 2008/07/02 06:52:43 nakanose_jin
bye inheritance & dev_full error
Revision 1.2 2008/06/25 00:58:19 nakanose_jin
add control level error
Revision 1.1 2008/04/08 18:25:40 paul
Moved error definitions from wfs.h to this header file.
*---------------------------------------------------------------------------*/
#ifndef __WFS_ERROR_H__
#define __WFS_ERROR_H__
#ifdef __cplusplus
extern "C" {
#endif
// ---------------------------------------------------------------------
// WFS error codes
// ---------------------------------------------------------------------
typedef enum {
WFS_RESULT_OK = 0, // Success
// Errors that can usually be detected early, and if detected, would result in the Async callback not being called:
WFS_RESULT_BUSY = -1, // Too many requests, try waiting then calling again.
WFS_RESULT_OUT_OF_MEMORY = -2, // The library does not have enough memory to complete the requested operation. (May be due to too many outstanding aysnc calls).
WFS_RESULT_INVALID = -3, // The function parameters were invalid, e.g. File name is too long, Path is too long or too deep.
WFS_RESULT_ACCESS = -4, // Trying to write to a file which was opened for read-only access, or vice versa.
WFS_RESULT_LIB_NOT_INITIALIZED = -5, // The WFS library has not been initialized. Please call WFSInit() (This error is checked in functions that require the library to be initialized, but only in the debug versions).
WFS_RESULT_LIB_ALREADY_INITIALIZED = -6, // The WFS library has already been initialized.
WFS_RESULT_FILE_TOO_BIG = -7, // The current write/append request would push the file over the size limit.
WFS_RESULT_NO_CHANGE_SIZE = -8, // The requested operation would cause the file size to change, but this file has WFS_PERM_NO_CHANGE_SIZE flag set.
// Errors that cannot usually be detected early, and would be passed via nResult to the Async callbacks:
WFS_RESULT_MEDIA_ERROR = -9, // The device or media is not attached, or was removed before the requested operation could be completed.
WFS_RESULT_DEV_UNUSABLE = -10, // Attached device is not accessible, e.g. because it is an unsupported device, or has an unknown format.
WFS_RESULT_DEV_NOT_INITIALIZED = -11, // Device not formatted, or does not yet contain a WFS volume
WFS_RESULT_DEV_IN_USE = -12, // Trying to initialize a device which is in use (mounted) by one or more clients.
WFS_RESULT_VOL_ID_ERROR = -13, // Attempted to mount a volume with the same unique Id as an already mounted volume (This could happen if the User backs up an entire WFS volume using a PC)
WFS_RESULT_WRITE_PROTECTED = -14, // Device is physically write protected (e.g. USB Flash memory, SD Card)
WFS_RESULT_ALREADY_MOUNTED = -15, // The device is already mounted
WFS_RESULT_PERMISSION = -16, // Permission flags do not permit the requested access from this application.
WFS_RESULT_PERMISSION_CL = -17, // Permission error caused by control level problems.
WFS_RESULT_ACL_FULL = -18, // The access list is full.
WFS_RESULT_ACL_ENTRY_NOT_FOUND = -19, // The specified entry does not exist in the access list.
WFS_RESULT_AUTHENTICATION = -20, // Trying to access content on a different Wii, which does not have the required access rights.
WFS_RESULT_CORRUPTION = -21, // A corrupted block was encountered which prevented the operation from being completed.
WFS_RESULT_DIRECTORY_QUOTA = -22, // One of the ancestor directories would exceed its quota.
WFS_RESULT_MAX_HANDLES = -23, // The maximum number of concurrent file handles / search handles are already in use.
WFS_RESULT_ALREADY_EXISTS = -24, // The file or directory being created already exists.
WFS_RESULT_NOT_FOUND = -25, // The specified file, directory or device does not exist.
WFS_RESULT_NOT_EMPTY = -26, // The specified directory cannot be deleted because it is not empty.
WFS_RESULT_NOT_FILE = -27, // The specified path is directory instead of a file.
WFS_RESULT_NOT_DIRECTORY = -28, // The specified path is a file instead of a directory.
WFS_RESULT_FILE_OPEN = -29, // The file is open. Cannot delete, move, rename, change permissions of an open file. Cannot open a file more than once unless all opens are WFS_ACCESS_READ.
WFS_RESULT_LOCKED = -30, // Cannot perform the requested operation since the file or directory is locked by an existing operation.
WFS_RESULT_RESOURCE_LIMIT_EXCEEDED = -31, // A resource limit prevents this function call. Try smaller values.
WFS_RESULT_NOT_IMPLEMENTED = -1026, // The requested function has not yet been implemented //ToDo: This error should be removed from the final API
WFS_RESULT_UNKNOWN = -1027, // Unexpected error - could be caused by a bug in the file system.
WFS_RESULT_FATAL_ERROR = -1028 // May be caused by critical metadata corruption.
} WFSResult;
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif //define __WFS_ERROR_H__