diff options
Diffstat (limited to 'utils/MTP/beastpatcher/beastpatcher.c')
-rw-r--r-- | utils/MTP/beastpatcher/beastpatcher.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/utils/MTP/beastpatcher/beastpatcher.c b/utils/MTP/beastpatcher/beastpatcher.c index 35c4d83c31..b266079af5 100644 --- a/utils/MTP/beastpatcher/beastpatcher.c +++ b/utils/MTP/beastpatcher/beastpatcher.c | |||
@@ -170,11 +170,13 @@ int beastpatcher(const char* bootfile, const char* firmfile, int interactive) | |||
170 | 170 | ||
171 | if (bootfile) { | 171 | if (bootfile) { |
172 | if(readfile(bootfile, &bootloader) != 0) { | 172 | if(readfile(bootfile, &bootloader) != 0) { |
173 | fprintf(stderr,"[ERR] Reading bootloader file failed.\n"); | ||
173 | return 1; | 174 | return 1; |
174 | } | 175 | } |
175 | } | 176 | } |
176 | if (firmfile) { | 177 | if (firmfile) { |
177 | if(readfile(firmfile, &firmware) != 0) { | 178 | if(readfile(firmfile, &firmware) != 0) { |
179 | fprintf(stderr,"[ERR] Reading firmware file failed.\n"); | ||
178 | return 1; | 180 | return 1; |
179 | } | 181 | } |
180 | } | 182 | } |
@@ -211,7 +213,11 @@ int beastpatcher(const char* bootfile, const char* firmfile, int interactive) | |||
211 | { | 213 | { |
212 | if(firmfile) { | 214 | if(firmfile) { |
213 | /* if a firmware file is given create a dualboot image. */ | 215 | /* if a firmware file is given create a dualboot image. */ |
214 | mknkboot(&firmware, &bootloader, &fw); | 216 | if(mknkboot(&firmware, &bootloader, &fw)) |
217 | { | ||
218 | fprintf(stderr,"[ERR] Creating dualboot firmware failed.\n"); | ||
219 | return 1; | ||
220 | } | ||
215 | } | 221 | } |
216 | else { | 222 | else { |
217 | /* Create a single-boot bootloader from the embedded bootloader */ | 223 | /* Create a single-boot bootloader from the embedded bootloader */ |
@@ -219,7 +225,10 @@ int beastpatcher(const char* bootfile, const char* firmfile, int interactive) | |||
219 | } | 225 | } |
220 | 226 | ||
221 | if (fw.buf == NULL) | 227 | if (fw.buf == NULL) |
228 | { | ||
229 | fprintf(stderr,"[ERR] Creating the bootloader failed.\n"); | ||
222 | return 1; | 230 | return 1; |
231 | } | ||
223 | 232 | ||
224 | if (mtp_send_firmware(&mtp_info, fw.buf, fw.len) == 0) | 233 | if (mtp_send_firmware(&mtp_info, fw.buf, fw.len) == 0) |
225 | { | 234 | { |