don't complain if recovery icon is short
If the a recovery icon file is so short that we can't even read the
8-byte header, put a message in the log but not on the device screen.
We intentionally have zero-length files for some icons on some devices,
if they're never shown (eg, the firmware installation icons are only
used on HTC devices).
diff --git a/ui.c b/ui.c
index 0a8b985..51df1fa 100644
--- a/ui.c
+++ b/ui.c
@@ -339,7 +339,11 @@
for (i = 0; BITMAPS[i].name != NULL; ++i) {
int result = res_create_surface(BITMAPS[i].name, BITMAPS[i].surface);
if (result < 0) {
- LOGE("Missing bitmap %s\n(Code %d)\n", BITMAPS[i].name, result);
+ if (result == -2) {
+ LOGI("Bitmap %s missing header\n", BITMAPS[i].name);
+ } else {
+ LOGE("Missing bitmap %s\n(Code %d)\n", BITMAPS[i].name, result);
+ }
*BITMAPS[i].surface = NULL;
}
}