diff options
Diffstat (limited to 'utils/MTP/beastpatcher/beastpatcher.c')
-rw-r--r-- | utils/MTP/beastpatcher/beastpatcher.c | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/utils/MTP/beastpatcher/beastpatcher.c b/utils/MTP/beastpatcher/beastpatcher.c index 783b11f202..f0d9394f11 100644 --- a/utils/MTP/beastpatcher/beastpatcher.c +++ b/utils/MTP/beastpatcher/beastpatcher.c | |||
@@ -55,18 +55,6 @@ | |||
55 | #include "mtp_common.h" | 55 | #include "mtp_common.h" |
56 | #include "bootimg.h" | 56 | #include "bootimg.h" |
57 | 57 | ||
58 | #define VERSION "1.0 with v1 bootloader" | ||
59 | |||
60 | void print_usage(void) | ||
61 | { | ||
62 | fprintf(stderr,"Usage: beastpatcher [action]\n"); | ||
63 | fprintf(stderr,"\n"); | ||
64 | fprintf(stderr,"Where [action] is one of the following options:\n"); | ||
65 | fprintf(stderr," --install (default)\n"); | ||
66 | fprintf(stderr," -?, --help\n"); | ||
67 | fprintf(stderr,"\n"); | ||
68 | } | ||
69 | |||
70 | /* Code to create a single-boot bootloader. | 58 | /* Code to create a single-boot bootloader. |
71 | Based on tools/gigabeats.c by Will Robertson. | 59 | Based on tools/gigabeats.c by Will Robertson. |
72 | */ | 60 | */ |
@@ -139,27 +127,13 @@ static void create_single_boot(unsigned char* boot, int bootlen, | |||
139 | return; | 127 | return; |
140 | } | 128 | } |
141 | 129 | ||
142 | int beastpatcher(int argc, char* argv[]) | 130 | int beastpatcher(void) |
143 | { | 131 | { |
144 | char yesno[4]; | 132 | char yesno[4]; |
145 | unsigned char* fwbuf; | 133 | unsigned char* fwbuf; |
146 | int fwsize; | 134 | int fwsize; |
147 | struct mtp_info_t mtp_info; | 135 | struct mtp_info_t mtp_info; |
148 | 136 | ||
149 | (void)argv; | ||
150 | |||
151 | fprintf(stderr,"beastpatcher v" VERSION " - (C) 2009 by the Rockbox developers\n"); | ||
152 | fprintf(stderr,"This is free software; see the source for copying conditions. There is NO\n"); | ||
153 | fprintf(stderr,"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"); | ||
154 | |||
155 | /* No options are currently implemented, so just display help if any are | ||
156 | provided. */ | ||
157 | |||
158 | if (argc > 1) { | ||
159 | print_usage(); | ||
160 | return 1; | ||
161 | } | ||
162 | |||
163 | if (mtp_init(&mtp_info) < 0) { | 137 | if (mtp_init(&mtp_info) < 0) { |
164 | fprintf(stderr,"[ERR] Can not init MTP\n"); | 138 | fprintf(stderr,"[ERR] Can not init MTP\n"); |
165 | return 1; | 139 | return 1; |
@@ -212,16 +186,3 @@ int beastpatcher(int argc, char* argv[]) | |||
212 | return 0; | 186 | return 0; |
213 | } | 187 | } |
214 | 188 | ||
215 | |||
216 | int main(int argc, char* argv[]) | ||
217 | { | ||
218 | int res; | ||
219 | char yesno[4]; | ||
220 | |||
221 | res = beastpatcher(argc, argv); | ||
222 | |||
223 | printf("\nPress ENTER to exit beastpatcher: "); | ||
224 | fgets(yesno,4,stdin); | ||
225 | |||
226 | return res; | ||
227 | } | ||