diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-09-25 22:48:00 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-09-27 09:28:15 +0200 |
commit | 9d8bcbeb2abf0593ae9d804d038c3821693e7131 (patch) | |
tree | b1791263344ba6f04aeb13b2bb58b348b16da7d2 /rbutil/sansapatcher/sansapatcher.h | |
parent | af76fa3e7a321b303b0d219ed95578079bbc8a24 (diff) | |
download | rockbox-9d8bcbeb2abf0593ae9d804d038c3821693e7131.tar.gz rockbox-9d8bcbeb2abf0593ae9d804d038c3821693e7131.zip |
sansapatcher: rework exit code handling.
- #define all exit codes and use them for indicating further errors.
- only enable interactive (i.e. wait for keypress before exiting) mode
when built with bootloaders.
Change-Id: I6dcbc51226aadc4ab640bf260b6331ddbd4773cc
Diffstat (limited to 'rbutil/sansapatcher/sansapatcher.h')
-rw-r--r-- | rbutil/sansapatcher/sansapatcher.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/rbutil/sansapatcher/sansapatcher.h b/rbutil/sansapatcher/sansapatcher.h index 1ae101e012..259143e38a 100644 --- a/rbutil/sansapatcher/sansapatcher.h +++ b/rbutil/sansapatcher/sansapatcher.h | |||
@@ -28,6 +28,22 @@ extern "C" { | |||
28 | 28 | ||
29 | #include "sansaio.h" | 29 | #include "sansaio.h" |
30 | 30 | ||
31 | /* exit codes */ | ||
32 | #define SANSA_OK 0 | ||
33 | #define SANSA_WRONG_ARGUMENTS 1 | ||
34 | #define SANSA_OPEN_INFILE_FAILED 2 | ||
35 | #define SANSA_PARTITION_ERROR 3 | ||
36 | #define SANSA_CANNOT_REOPEN 5 | ||
37 | #define SANSA_INSTALL_FAILED 6 | ||
38 | #define SANSA_UNINSTALL_FAILED 7 | ||
39 | #define SANSA_ACCESS_DENIED 10 | ||
40 | #define SANSA_NOT_FOUND 11 | ||
41 | #define SANSA_WRONG_DEVICE_COUNT 12 | ||
42 | #define SANSA_MULTIPLE_DEVICES 15 | ||
43 | #define SANSA_WRONG_TYPE 16 | ||
44 | #define SANSA_OLD_INSTALL 17 | ||
45 | #define SANSA_INTERNAL_ERROR 20 | ||
46 | |||
31 | extern int sansa_verbose; | 47 | extern int sansa_verbose; |
32 | /* Size of buffer for disk I/O - 8MB is large enough for any version | 48 | /* Size of buffer for disk I/O - 8MB is large enough for any version |
33 | of the Apple firmware, but not the Nano's RSRC image. */ | 49 | of the Apple firmware, but not the Nano's RSRC image. */ |