1 /*---------------------------------------------------------------------------* 2 Description: System IO Error Codes 3 File: sys_io_error.h 4 Description: This file defines the FSA interface. 5 6 Copyright (C) Nintendo. All rights reserved. 7 8 These coded instructions, statements, and computer programs contain 9 proprietary information of Nintendo of America Inc. and/or Nintendo 10 Company Ltd., and are protected by Federal copyright law. They may 11 not be disclosed to third parties or copied or duplicated in any form, 12 in whole or in part, without the prior written consent of Nintendo. 13 14 *---------------------------------------------------------------------------*/ 15 #ifndef __SYS_IO_ERROR_H__ 16 #define __SYS_IO_ERROR_H__ 17 18 #include <types.h> 19 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 /*---------------------------------------------------------------------------* 26 * -- GENERAL -- 27 *---------------------------------------------------------------------------*/ 28 29 /*---------------------------------------------------------------------------* 30 * -- FILE SYSTEM -- 31 *---------------------------------------------------------------------------*/ 32 #define FSA_STATUS_OK 0 33 34 #define FSA_STATUS_ERROR_BASE (-196608) 35 /* FSA service is not initialized */ 36 #define FSA_STATUS_NOT_INIT (FSA_STATUS_ERROR_BASE-1) // -196609 37 /* FSA shim or IPC was too busy */ 38 #define FSA_STATUS_BUSY (FSA_STATUS_ERROR_BASE-2) // -196610 39 /* Command canceled */ 40 #define FSA_STATUS_CANCELED (FSA_STATUS_ERROR_BASE-3) // -196611 41 /* Indicates the end of a directory */ 42 #define FSA_STATUS_END_OF_DIRECTORY (FSA_STATUS_ERROR_BASE-4) // -196612 43 /* Indicates the end of a file */ 44 #define FSA_STATUS_END_OF_FILE (FSA_STATUS_ERROR_BASE-5) // -196613 45 46 /* Reached the max number of mount points */ 47 #define FSA_STATUS_MAX_MOUNTPOINTS (FSA_STATUS_ERROR_BASE-16) // -196624 48 /* Reached the max number of volumes */ 49 #define FSA_STATUS_MAX_VOLUMES (FSA_STATUS_ERROR_BASE-17) // -196625 50 /* Reached the max number of clients */ 51 #define FSA_STATUS_MAX_CLIENTS (FSA_STATUS_ERROR_BASE-18) // -196626 52 /* Reached the max number of file handles */ 53 #define FSA_STATUS_MAX_FILES (FSA_STATUS_ERROR_BASE-19) // -196627 54 /* Reached the max number of dir handles */ 55 #define FSA_STATUS_MAX_DIRS (FSA_STATUS_ERROR_BASE-20) // -196628 56 /* Target is already opened or locked by another transaction */ 57 #define FSA_STATUS_ALREADY_OPEN (FSA_STATUS_ERROR_BASE-21) // -196629 58 /* Target path already exists */ 59 #define FSA_STATUS_ALREADY_EXISTS (FSA_STATUS_ERROR_BASE-22) // -196630 60 /* Target path is not found */ 61 #define FSA_STATUS_NOT_FOUND (FSA_STATUS_ERROR_BASE-23) // -196631 62 /* Target path already exists */ 63 #define FSA_STATUS_NOT_EMPTY (FSA_STATUS_ERROR_BASE-24) // -196632 64 /* Attempted to access file with bad file mode */ 65 #define FSA_STATUS_ACCESS_ERROR (FSA_STATUS_ERROR_BASE-25) // -196633 66 /* Did not have permission to complete operation */ 67 #define FSA_STATUS_PERMISSION_ERROR (FSA_STATUS_ERROR_BASE-26) // -196634 68 /* Cannot complete transaction due to corrupted data block */ 69 #define FSA_STATUS_DATA_CORRUPTED (FSA_STATUS_ERROR_BASE-27) // -196635 70 /* Request would cause one of the ancestor directories to exceed its quota 71 * Or no free space left in storage */ 72 #define FSA_STATUS_STORAGE_FULL (FSA_STATUS_ERROR_BASE-28) // -196636 73 /* Transaction journal is full, need to flush */ 74 #define FSA_STATUS_JOURNAL_FULL (FSA_STATUS_ERROR_BASE-29) // -196637 75 /* The entry being accessed was "link" entry. 76 * FSA tries to access another accessible mount point if mounted as "patch" */ 77 #define FSA_STATUS_LINK_ENTRY (FSA_STATUS_ERROR_BASE-30) // -196638 78 79 /* Operation is not available now */ 80 #define FSA_STATUS_UNAVAILABLE_CMD (FSA_STATUS_ERROR_BASE-31) // -196639 81 /* Operation is not supported by FS */ 82 #define FSA_STATUS_UNSUPPORTED_CMD (FSA_STATUS_ERROR_BASE-32) // -196640 83 /* Specified parameter is invalid */ 84 #define FSA_STATUS_INVALID_PARAM (FSA_STATUS_ERROR_BASE-33) // -196641 85 /* Specified path is invalid */ 86 #define FSA_STATUS_INVALID_PATH (FSA_STATUS_ERROR_BASE-34) // -196642 87 /* Specified buffer is invalid */ 88 #define FSA_STATUS_INVALID_BUFFER (FSA_STATUS_ERROR_BASE-35) // -196643 89 /* Specified alignment is invalid */ 90 #define FSA_STATUS_INVALID_ALIGNMENT (FSA_STATUS_ERROR_BASE-36) // -196644 91 /* Specified client handle is invalid */ 92 #define FSA_STATUS_INVALID_CLIENT_HANDLE (FSA_STATUS_ERROR_BASE-37) // -196645 93 /* Specified file handle is invalid */ 94 #define FSA_STATUS_INVALID_FILE_HANDLE (FSA_STATUS_ERROR_BASE-38) // -196646 95 /* Specified dir handle is invalid */ 96 #define FSA_STATUS_INVALID_DIR_HANDLE (FSA_STATUS_ERROR_BASE-39) // -196647 97 /* Specified path is a directory instead of a file. */ 98 #define FSA_STATUS_NOT_FILE (FSA_STATUS_ERROR_BASE-40) // -196648 99 /* Specified path is a file instead of a directory. */ 100 #define FSA_STATUS_NOT_DIR (FSA_STATUS_ERROR_BASE-41) // -196649 101 /* Request would push the file over the size limit (not the quota limit). */ 102 #define FSA_STATUS_FILE_TOO_BIG (FSA_STATUS_ERROR_BASE-42) // -196650 103 /* Attempted to access out of accessible area */ 104 #define FSA_STATUS_OUT_OF_RANGE (FSA_STATUS_ERROR_BASE-43) // -196651 105 /* Internal resources ran short */ 106 #define FSA_STATUS_OUT_OF_RESOURCES (FSA_STATUS_ERROR_BASE-44) // -196652 107 108 /* Medium is not ready to use, user has to put medium correctly */ 109 #define FSA_STATUS_MEDIA_NOT_READY (FSA_STATUS_ERROR_BASE-64) // -196672 110 /* Medium is in some bad condition */ 111 #define FSA_STATUS_MEDIA_ERROR (FSA_STATUS_ERROR_BASE-65) 112 /* Medium is write protected */ 113 #define FSA_STATUS_WRITE_PROTECTED (FSA_STATUS_ERROR_BASE-66) 114 115 #define FSA_STATUS_ERROR_BASE_END (FSA_STATUS_ERROR_BASE-1024) 116 117 /* 118 * DEPRECATED: THIS MACRO IS KEPT FOR BUILD COMPATIBILITY. 119 * THIS WILL BE REMOVED IN FUTURE. 120 */ 121 /* Fatal system error, call FSAGetError() to get precise error codes */ 122 #define FSA_STATUS_SYSTEM_ERROR (FSA_STATUS_ERROR_BASE-1024) 123 124 /*---------------------------------------------------------------------------* 125 * -- NETWORK -- 126 *---------------------------------------------------------------------------*/ 127 128 /*---------------------------------------------------------------------------* 129 * -- USB -- 130 *---------------------------------------------------------------------------*/ 131 #define UHS_STATUS_OK 0 132 #define UHS_STATUS_ERROR_BASE (-2162688) 133 #define UHS_STATUS_TXN_CANCELLED (UHS_STATUS_ERROR_BASE -1) 134 #define UHS_STATUS_LIMIT_EXCEEDED (UHS_STATUS_ERROR_BASE -2) 135 #define UHS_STATUS_LOCAL_ARGUMENT_INVALID (UHS_STATUS_ERROR_BASE -3) 136 #define UHS_STATUS_LOCAL_STATE_INVALID (UHS_STATUS_ERROR_BASE -4) 137 #define UHS_STATUS_LOCAL_BUF_ERROR (UHS_STATUS_ERROR_BASE -5) 138 #define UHS_STATUS_INVALID_HANDLE (UHS_STATUS_ERROR_BASE -6) 139 #define UHS_STATUS_OBJ_ALLOC_FAIL (UHS_STATUS_ERROR_BASE -7) 140 #define UHS_STATUS_INVALID_STATE (UHS_STATUS_ERROR_BASE -8) 141 #define UHS_STATUS_EXISTS (UHS_STATUS_ERROR_BASE -9) 142 #define UHS_STATUS_NONEXISTIENT (UHS_STATUS_ERROR_BASE -10) 143 #define UHS_STATUS_FIFO_ERROR (UHS_STATUS_ERROR_BASE -11) 144 #define UHS_STATUS_INVALID_COMMAND (UHS_STATUS_ERROR_BASE -12) 145 #define UHS_STATUS_SERVER_STATE_INVALID (UHS_STATUS_ERROR_BASE -14) 146 #define UHS_STATUS_SERVER_ARGUMENT_INVALID (UHS_STATUS_ERROR_BASE -15) 147 #define UHS_STATUS_UNEXPECTED_EVENT (UHS_STATUS_ERROR_BASE -16) 148 #define UHS_STATUS_INVALID_INTERFACE_VECTOR (UHS_STATUS_ERROR_BASE -17) 149 #define UHS_STATUS_BUSY (UHS_STATUS_ERROR_BASE -18) 150 #define UHS_STATUS_INTERFACE_NOT_ACQUIRED (UHS_STATUS_ERROR_BASE -19) 151 #define UHS_STATUS_HC_NOT_RESPONDING (UHS_STATUS_ERROR_BASE -20) 152 #define UHS_STATUS_INVALID_DEVICE (UHS_STATUS_ERROR_BASE -21) 153 #define UHS_STATUS_INVALID_ENDPOINT (UHS_STATUS_ERROR_BASE -22) 154 #define UHS_STATUS_INVALID_ENDPOINT_STATE (UHS_STATUS_ERROR_BASE -23) 155 #define UHS_STATUS_INVALID_ENDPOINT_NUM (UHS_STATUS_ERROR_BASE -24) 156 #define UHS_STATUS_INVALID_ENDPOINT_TYPE (UHS_STATUS_ERROR_BASE -25) 157 #define UHS_STATUS_INVALID_ENDPOINT_DIR (UHS_STATUS_ERROR_BASE -26) 158 #define UHS_STATUS_NOT_ENDPOINT_OWNER (UHS_STATUS_ERROR_BASE -27) 159 #define UHS_STATUS_INVALID_IF (UHS_STATUS_ERROR_BASE -28) 160 #define UHS_STATUS_INVALID_ALT_IF (UHS_STATUS_ERROR_BASE -29) 161 #define UHS_STATUS_TD_ERROR (UHS_STATUS_ERROR_BASE -30) 162 #define UHS_STATUS_TD_DATA_BUFFER_ERROR (UHS_STATUS_ERROR_BASE -31) 163 #define UHS_STATUS_TD_BABBLE (UHS_STATUS_ERROR_BASE -32) 164 #define UHS_STATUS_TD_XACTERR (UHS_STATUS_ERROR_BASE -33) 165 #define UHS_STATUS_TD_MISSED_MICROFRAME (UHS_STATUS_ERROR_BASE -34) 166 #define UHS_STATUS_TD_PERIODIC_SPLIT_ERROR (UHS_STATUS_ERROR_BASE -35) 167 #define UHS_STATUS_TD_STALL_ERROR (UHS_STATUS_ERROR_BASE -36) 168 #define UHS_STATUS_TD_PROTOCOL_ERROR (UHS_STATUS_ERROR_BASE -37) 169 #define UHS_STATUS_TD_XFER_ERROR (UHS_STATUS_ERROR_BASE -38) 170 #define UHS_STATUS_URB_STATE_INVALID (UHS_STATUS_ERROR_BASE -39) 171 #define UHS_STATUS_DEVICE_STATE_INVALID (UHS_STATUS_ERROR_BASE -40) 172 #define UHS_STATUS_DEVICE_DISCONNECT (UHS_STATUS_ERROR_BASE -41) 173 #define UHS_STATUS_HC_STATE_INVALID (UHS_STATUS_ERROR_BASE -42) 174 #define UHS_STATUS_EP_TYPE_INVALID (UHS_STATUS_ERROR_BASE -43) 175 #define UHS_STATUS_EP_DIR_INVALID (UHS_STATUS_ERROR_BASE -44) 176 #define UHS_STATUS_EP_URB_LIMIT (UHS_STATUS_ERROR_BASE -45) 177 #define UHS_STATUS_EP_CLOSED (UHS_STATUS_ERROR_BASE -46) 178 #define UHS_STATUS_EP_STATE_INVALID (UHS_STATUS_ERROR_BASE -47) 179 #define UHS_STATUS_UNEXPECTED_SHORT_XFER (UHS_STATUS_ERROR_BASE -48) 180 #define UHS_STATUS_INVALID_STRING_DESCRIPTOR (UHS_STATUS_ERROR_BASE -49) 181 #define UHS_STATUS_INVALID_DEVICE_DESCRIPTOR (UHS_STATUS_ERROR_BASE -50) 182 #define UHS_STATUS_INVALID_CONFIG_DESCRIPTOR (UHS_STATUS_ERROR_BASE -51) 183 #define UHS_STATUS_INVALID_INTERFACE_DESCRIPTOR (UHS_STATUS_ERROR_BASE -52) 184 #define UHS_STATUS_INVALID_ENDPOINT_DESCRIPTOR (UHS_STATUS_ERROR_BASE -53) 185 #define UHS_STATUS_ADDRESS_ERROR (UHS_STATUS_ERROR_BASE -54) 186 #define UHS_STATUS_INVALID_PORT (UHS_STATUS_ERROR_BASE -55) 187 #define UHS_STATUS_LOCAL_OBJ_MSG_ERROR (UHS_STATUS_ERROR_BASE -56) 188 #define UHS_STATUS_LIST_ERROR (UHS_STATUS_ERROR_BASE -57) 189 #define UHS_STATUS_INACTIVE (UHS_STATUS_ERROR_BASE -58) 190 #define UHS_STATUS_TIMEOUT (UHS_STATUS_ERROR_BASE -59) 191 #define UHS_STATUS_INVALID_BANDWIDTH (UHS_STATUS_ERROR_BASE -60) 192 #define UHS_STATUS_INVALID_SIZE (UHS_STATUS_ERROR_BASE -61) 193 #define UHS_STATUS_LOCKED (UHS_STATUS_ERROR_BASE -62) 194 #define UHS_STATUS_DEVICE_NOT_FOUND (UHS_STATUS_ERROR_BASE -63) 195 #define UHS_STATUS_INVALID_EP_URB_LIMIT (UHS_STATUS_ERROR_BASE -64) 196 #define UHS_STATUS_DEVICE_SUSPENDED (UHS_STATUS_ERROR_BASE -65) 197 #define UHS_STATUS_INVALID_DEVICE_PROFILE (UHS_STATUS_ERROR_BASE -66) 198 199 /*---------------------------------------------------------------------------* 200 * -- CCR -- 201 *---------------------------------------------------------------------------*/ 202 #define CCR_ERROR_NONE 0 203 204 // CCR lib/shim errors 205 #define CCR_ERROR_ACCESS -1179647 206 #define CCR_ERROR_ALLOC_IPC_BUFFER -1179646 207 #define CCR_ERROR_NOT_IMPLEMENTED -1179645 208 #define CCR_ERROR_INVALID -1179644 209 #define CCR_ERROR_READ -1179643 210 #define CCR_ERROR_NO_INPUT -1179642 211 #define CCR_ERROR_DESTINATION_ID -1179641 212 #define CCR_ERROR_PATH_LENGTH -1179640 213 #define CCR_ERROR_PORT_ID -1179639 214 215 // CCR RM errors 216 #define CCR_ERROR_INVALID_RM_CMD -1179548 217 #define CCR_ERROR_INVALID_IOCTLV_CMD -1179547 218 #define CCR_ERROR_VECTOR_COUNT -1179546 219 #define CCR_ERROR_MEMORY_BANK -1179545 220 #define CCR_ERROR_DATA_ALIGNMENT -1179544 221 #define CCR_ERROR_DATA_SIZE -1179543 222 #define CCR_ERROR_REQUEST_CANCELLED -1179542 223 #define CCR_ERROR_REQUEST_TIMEOUT -1179541 224 #define CCR_ERROR_REQUEST_ABORTED -1179540 225 #define CCR_ERROR_DRH_NOT_ATTACHED -1179539 226 #define CCR_ERROR_CDC_RX_LENGTH -1179538 227 #define CCR_ERROR_ALLOC_TASK -1179537 228 #define CCR_ERROR_SAME_FW_VERSION -1179536 229 #define CDC_ERROR_CDC_SYNC_FLAG -1179535 230 #define CDC_ERROR_CDC_PROTOCOL_VERSION -1179534 231 #define CDC_ERROR_CDC_SESSION_ID -1179533 232 #define CDC_ERROR_CDC_SESSION_END -1179532 233 #define CDC_ERROR_CDC_SEQUENCE -1179531 234 #define CDC_ERROR_CDC_DESTINATION_ID -1179530 235 #define CDC_ERROR_CDC_SOURCE_ID -1179529 236 #define CDC_ERROR_CDC_REQRSPIND -1179528 237 #define CDC_ERROR_CDC_MESSAGE_TYPE -1179527 238 #define CDC_ERROR_CDC_MESSAGE_SIGNAL -1179526 239 #define CDC_ERROR_CDC_RESULT_CODE -1179525 240 #define CDC_ERROR_CDC_PAYLOAD_LENGTH -1179524 241 #define CDC_ERROR_CDC_BIN_HEADER -1179523 242 #define CDC_ERROR_WPS_TIMEOUT -1179522 243 #define CDC_ERROR_USE_SDK_2_03 -1179521 244 #define CDC_ERROR_ES2_UP_TO_DATE -1179520 245 #define CDC_ERROR_DRH_NOT_ATTACHED -1179519 246 #define CDC_ERROR_UPDATE_ABORTED -1179518 247 #define CDC_ERROR_FW_UPDATE_AUDIT_FAIL -1179517 248 #define CDC_ERROR_FW_UPDATE_ACTIVATE_FAIL -1179516 249 #define CDC_ERROR_FW_UPDATE_UNDEFINED -1179515 250 251 /*---------------------------------------------------------------------------* 252 * -- USR CFG -- 253 *---------------------------------------------------------------------------*/ 254 #define UC_RVAL_OK 0 255 #define UC_RVAL_UNKNOWN_ERROR -2097153 // unclassified error 256 #define UC_RVAL_SYSTEM_ERROR -2097154 // system error below UC 257 #define UC_RVAL_ALLOC_ERROR -2097155 // error allocating data 258 #define UC_RVAL_INVALID_OP_ERROR -2097156 // invalid RPC operation 259 #define UC_RVAL_INVALID_ARG_ERROR -2097157 // invalid argument, such as NULL pointer 260 #define UC_RVAL_INVALID_TYPE_ERROR -2097158 // invalid type for operation 261 #define UC_RVAL_UNSUPPORTED_ERROR -2097159 // feature not supported 262 263 #define UC_RVAL_ITEM_ACCESS_ERROR -2097160 // accessing node in an unsupported manner (e.g. reading value non leaf node) 264 #define UC_RVAL_KEY_NOT_FOUND_ERROR -2097161 // node key not found 265 #define UC_RVAL_BAD_MODIFY_ERROR -2097162 // modifying a nodes attributes 266 #define UC_RVAL_STRING_LENGTH_ERROR -2097163 // string/buffer too long for allocated area 267 #define UC_RVAL_INVALID_ROOTKEY_ERROR -2097164 // a problem with the rootkey 268 #define UC_RVAL_INVALID_LOC_ERROR -2097165 // loc portion of the key is invalid 269 #define UC_RVAL_BAD_COMMENT_ERROR -2097166 // comment bad (not ending right or on wrong type of node) 270 #define UC_RVAL_ACCESS_READ_ERROR -2097167 // no read access 271 #define UC_RVAL_ACCESS_WRITE_ERROR -2097168 // no write access 272 #define UC_RVAL_ACCESS_CREATE_ERROR -2097169 // no create access 273 #define UC_RVAL_FILESYS_NAME_ERROR -2097170 // file name malformed for device 274 275 #define UC_RVAL_FILESYS_INIT_ERROR -2097171 // error initializing a file system 276 #define UC_RVAL_FILESYS_MOUNT_ERROR -2097172 // error mounting a file system 277 #define UC_RVAL_FILE_OPEN_ERROR -2097173 // error opening file - usually means file doesn't exist 278 #define UC_RVAL_FILE_STAT_ERROR -2097174 // error stating file 279 #define UC_RVAL_FILE_READ_ERROR -2097175 // error reading file 280 #define UC_RVAL_FILE_WRITE_ERROR -2097176 // error writing file 281 #define UC_RVAL_FILE_SIZE_ERROR -2097177 // xml file bigger than max size 282 #define UC_RVAL_FILE_REMOVE_ERROR -2097178 // error removing/deleting file 283 #define UC_RVAL_FILE_RENAME_ERROR -2097179 // error renaming a file 284 285 #define UC_RVAL_FILE_CLOSE_ERROR -2097180 // error closing file 286 #define UC_RVAL_FILE_SEEK_ERROR -2097181 // error seeking in file 287 #define UC_RVAL_FILE_CONFIRM_ERROR -2097182 // Confirm file either existed or not existed as expected 288 #define UC_RVAL_FILE_BACKUP_ERROR -2097183 // Backup file doesn't exist as expected 289 #define UC_RVAL_FILE_MALFORMED_ERROR -2097184 // XML data is malformed 290 #define UC_RVAL_VERSION_ERROR -2097185 // Version number either doesn't exist or is wrong 291 #define UC_RVAL_NO_IPC_BUFFERS_ERROR -2097186 // Ran out of IPC buffers 292 #define UC_RVAL_TIMEOUT_ERROR -2097187 // Some sort of timeout 293 #define UC_RVAL_FILE_LOCK_NEEDED_ERROR -2097188 // Expected serialization of file creates/deletes violated... May need a file lock. (This one means assumptions aren't true) 294 295 #define UC_RVAL_SYSCTX_NOT_FOUND_ERROR -2097189 // System context not found or invalid 296 #define UC_RVAL_INVALID_TRIGGER_ERROR -2097190 // Trigger index is out of range 297 #define UC_RVAL_TRIGGER_NOT_FOUND_ERROR -2097191 // Trigger with specified ID not found 298 299 #define UC_RVAL_SYSPROT_INIT_ERROR -2097192 // system protection error 300 #define UC_RVAL_SYSPROT_MEMBLOCK_ERROR -2097193 301 #define UC_RVAL_SYSPROT_SRAM_ERROR -2097194 302 #define UC_RVAL_SYSPROT_DEVICES_ERROR -2097195 303 #define UC_RVAL_SYSPROT_FINE_GRAIN_ERROR -2097196 304 305 #define UC_RVAL_FILE_NOT_FOUND_ERROR -2097197 // no target file 306 #define UC_RVAL_INCORRECT_VERSION_ERROR -2097198 // higher version is already installed 307 308 #ifdef __cplusplus 309 } 310 #endif 311 312 #endif // __SYS_IO_ERROR_H__ 313