diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2010-06-19 21:27:43 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2010-06-19 21:27:43 +0000 |
commit | 9d242ab16748c93df5acd1cb57162a3b644fa73e (patch) | |
tree | 70c15fb007c868fa65d765b223db743ad1f3f961 /utils | |
parent | b40c300d594ede952f612ff7ea3e4db71a5d1d30 (diff) |
Add error messages to a few more failure cases to beastpatcher.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26978 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils')
-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) if (bootfile) { if(readfile(bootfile, &bootloader) != 0) { + fprintf(stderr,"[ERR] Reading bootloader file failed.\n"); return 1; } } if (firmfile) { if(readfile(firmfile, &firmware) != 0) { + fprintf(stderr,"[ERR] Reading firmware file failed.\n"); return 1; } } @@ -211,7 +213,11 @@ int beastpatcher(const char* bootfile, const char* firmfile, int interactive) { if(firmfile) { /* if a firmware file is given create a dualboot image. */ - mknkboot(&firmware, &bootloader, &fw); + if(mknkboot(&firmware, &bootloader, &fw)) + { + fprintf(stderr,"[ERR] Creating dualboot firmware failed.\n"); + return 1; + } } else { /* Create a single-boot bootloader from the embedded bootloader */ @@ -219,7 +225,10 @@ int beastpatcher(const char* bootfile, const char* firmfile, int interactive) } if (fw.buf == NULL) + { + fprintf(stderr,"[ERR] Creating the bootloader failed.\n"); return 1; + } if (mtp_send_firmware(&mtp_info, fw.buf, fw.len) == 0) { |