Line 585:
Line 585:
|}
|}
−
== /dev/es error codes ==
+
== Error codes ==
−
{{stub}}
+
This list of ES error codes should be complete for IOS59. Other codes that can technically be returned, but only indirectly (since ES makes use of the FS module and IOSC) are not included in an exhaustive manner in this list.
+
{| class="wikitable"
{| class="wikitable"
|-
|-
! Error code
! Error code
−
! POSIX equivalent
! Notes
! Notes
|-
|-
−
| -106
+
| -106 (FS)
−
| ?
+
| No such file or directory (returned by the FS module indirectly)
−
| Invalid TMD when using ES_OpenContent or <marcan> HUGHLALUGH SOMETHING FUCKED UP AND I'M NOT TELLING, or access denied
|-
|-
−
| -1009
+
| -1005 (ES)
−
| EIO
+
| Invalid public key type in certificate
+
|-
+
| -1009 (ES)
| Read failure (short read)
| Read failure (short read)
|-
|-
−
| -1010
+
| -1010 (ES)
−
| EIO
| Write failure (short write)
| Write failure (short write)
|-
|-
−
| -1012
+
| -1012 (ES)
−
| ?
+
| Invalid signature type (for signed blobs)
−
| Invalid signature type
|-
|-
−
| -1015
+
| -1015 (ES)
−
| ?
+
| Invalid value for byte at 0x180 in ticket (valid:0,1,2). {{check|Unused in IOS59?}}
−
| Invalid value for byte at 0x180 in ticket (valid:0,1,2)
|-
|-
−
| -1017
+
| -1016 (ES)
−
| EINVAL
+
| Maximum amount of handles exceeded (3 handles, as there are only 3 contexts)
−
| Wrong IN or OUT size, wrong size for a part of the vector, vector alignment problems, non-existant ioctl
|-
|-
−
| -1020
+
| -1017 (ES)
−
| ?
+
| Invalid arguments
−
| ConsoleID mismatch
|-
|-
−
| -1022
+
| -1020 (ES)
−
| ?
+
| Device ID mismatch. Returned by ES_ImportTicket if the ticket is personalised and the device ID from the ticket mismatches with the actual ID.
−
| Content did not match hash in TMD
|-
|-
−
| -1024
+
| -1022 (ES)
−
| ENOMEM
+
| Imported content hash does not match with the hash from the TMD. Returned by ES_ImportContentEnd and ES_ImportBoot.
+
|-
+
| -1024 (ES)
| Memory allocation failure
| Memory allocation failure
|-
|-
−
| -1026
+
| -1026 (ES)
−
| EACCESS
+
| Incorrect access rights (according to the TMD)
−
| Incorrect access rights
+
|-
+
| -1027 (ES)
+
| Issuer not found in the certificate chain
+
|-
+
| -1028 (ES)
+
| Ticket not ticket
+
|-
+
| -1029 (ES)
+
| Invalid ticket. This is returned if the common key field contains an invalid value (anything other than 0 or 1). This is also returned from ES_LaunchTitle if the title ID contained in the ticket does not match the TMD title ID.
+
|-
+
| -1031 (ES)
+
| During LaunchTitle/ImportTitle: installed boot2 version is too old. During ImportBoot: downgrades are not allowed.
+
|-
+
| -1032 (ES)
+
| Fatal error early in ES initialisation. Can also be returned in ES_CheckHasKoreanKey in some cases. {{check}}
+
|-
+
| -1033 (ES)
+
| A ticket limit was exceeded (duration or launch count)
+
|-
+
| -1034 (ES)
+
| Returned in ES_CheckHasKoreanKey in some cases. {{check}}
+
|-
+
| -1035 (ES)
+
| A title with a higher version is already installed
+
|-
+
| -1036 (ES)
+
| Required sysversion(IOS) is not installed (only for the system menu {{check}})
+
|-
+
| -1037 (ES)
+
| Installed number of contents doesn't match TMD (only for the system menu {{check}})
+
|-
+
| -2000 (IOSC)
+
| Permission denied (returned when accessing an object for which the caller has no permission)
+
|-
+
| -2001 (IOSC)
+
| IOSC_EEXIST
+
|-
+
| -2003 (IOSC)
+
| IOSC_EMAX
+
|-
+
| -2004 (IOSC)
+
| IOSC_ENOENT
+
|-
+
| -2005 (IOSC)
+
| IOSC_INVALID_OBJTYPE
+
|-
+
| -2006 (IOSC)
+
| IOSC_INVALID_RNG
|-
|-
−
| -1028
+
| -2007 (IOSC)
−
| ENOENT
+
| IOSC_INVALID_FLAG
−
| No ticket installed
|-
|-
−
| -1029
+
| -2008 (IOSC)
−
| ?
+
| IOSC_INVALID_FORMAT
−
| Installed Ticket/TMD is invalid
|-
|-
−
| -1035
+
| -2009 (IOSC)
−
| ?
+
| IOSC_INVALID_VERSION
−
| Title with a higher version is already installed
|-
|-
−
| -1036
+
| -2010 (IOSC)
−
| ?
+
| IOSC_INVALID_SIGNER
−
| Required sysversion(IOS) is not installed
|-
|-
−
| -2008
+
| -2011 (IOSC)
−
| EINVAL
+
| IOSC_FAIL_CHECKVALUE. Notably returned when a signature check failed.
−
| Invalid parameter(s)
|-
|-
−
| -2011
+
| -2012 (IOSC)
−
| ?
+
| Internal failure
−
| Signature check failed
|-
|-
−
| -2013
+
| -2013 (IOSC)
−
| ?
+
| Memory allocation failure. Notably returned when the keyring is full (contains 0x20 keys)
−
| Keyring is full (contains 0x20 keys)
|-
|-
−
| -2014
+
| -2014 (IOSC)
−
| ?
+
| Invalid size
−
| Bad hash length (!= 20)
|-
|-
−
| -2016
+
| -2015 (IOSC)
−
| ?
+
| Invalid address
−
| unaligned data
|-
|-
−
| -4100
+
| -2016 (IOSC)
−
| ?
+
| Unaligned data
−
| Wrong Ticket-, Cert size or invalid Ticket-, Cert data
|}
|}
[[Category:IOS API documentation]]
[[Category:IOS API documentation]]