diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-09-25 22:45:05 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-09-27 09:28:10 +0200 |
commit | af76fa3e7a321b303b0d219ed95578079bbc8a24 (patch) | |
tree | 202cb19de683700abff7b4a816599001871821a0 /rbutil/ipodpatcher/ipodpatcher.h | |
parent | 3806f57ed8a220358e701b4f29703dd3820ac686 (diff) | |
download | rockbox-af76fa3e7a321b303b0d219ed95578079bbc8a24.tar.gz rockbox-af76fa3e7a321b303b0d219ed95578079bbc8a24.zip |
ipodpatcher: Rework exit codes.
- #define all exit codes used so they can be checked more easily.
- Use exit codes to indicate more error states.
Change-Id: I052962e3457a7cd5eca8b70256889d25b1b4b3aa
Diffstat (limited to 'rbutil/ipodpatcher/ipodpatcher.h')
-rw-r--r-- | rbutil/ipodpatcher/ipodpatcher.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/rbutil/ipodpatcher/ipodpatcher.h b/rbutil/ipodpatcher/ipodpatcher.h index 6f0498a4e0..2cd2331666 100644 --- a/rbutil/ipodpatcher/ipodpatcher.h +++ b/rbutil/ipodpatcher/ipodpatcher.h | |||
@@ -19,8 +19,8 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #ifndef _IPODPATCHER_H | 22 | #ifndef IPODPATCHER_H |
23 | #define _IPODPATCHER_H | 23 | #define IPODPATCHER_H |
24 | 24 | ||
25 | #ifdef __cplusplus | 25 | #ifdef __cplusplus |
26 | extern "C" { | 26 | extern "C" { |
@@ -28,6 +28,22 @@ extern "C" { | |||
28 | 28 | ||
29 | #include "ipodio.h" | 29 | #include "ipodio.h" |
30 | 30 | ||
31 | /* exit codes */ | ||
32 | #define IPOD_OK 0 | ||
33 | #define IPOD_WRONG_ARGUMENTS 1 | ||
34 | #define IPOD_OPEN_INFILE_FAILED 2 | ||
35 | #define IPOD_PARTITION_ERROR 3 | ||
36 | #define IPOD_OPEN_OUTFILE_FAILED 4 | ||
37 | #define IPOD_CANNOT_REOPEN 5 | ||
38 | #define IPOD_ACCESS_DENIED 10 | ||
39 | #define IPOD_NOT_FOUND 11 | ||
40 | #define IPOD_WRONG_DEVICE_COUNT 12 | ||
41 | #define IPOD_IMAGE_ERROR 13 | ||
42 | #define IPOD_DUMP_FAILED 14 | ||
43 | #define IPOD_MULTIPLE_DEVICES 15 | ||
44 | #define IPOD_WRONG_TYPE 16 | ||
45 | #define IPOD_UNKNOWN_FW_VERSION -1 | ||
46 | |||
31 | /* Size of buffer for disk I/O - 8MB is large enough for any version | 47 | /* Size of buffer for disk I/O - 8MB is large enough for any version |
32 | of the Apple firmware, but not the Nano's RSRC image. */ | 48 | of the Apple firmware, but not the Nano's RSRC image. */ |
33 | #define BUFFER_SIZE 8*1024*1024 | 49 | #define BUFFER_SIZE 8*1024*1024 |