diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-05 22:13:20 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-05 22:13:20 +0000 |
commit | 15124aa7c288be5e30df04d84a3d9aa2d14e4bb7 (patch) | |
tree | d11e4f3ec3cd6a54c281506e0913055319f27fc8 | |
parent | bd1f0304112ee92a1bd87e8bf7a3c697ed868938 (diff) | |
download | rockbox-15124aa7c288be5e30df04d84a3d9aa2d14e4bb7.tar.gz rockbox-15124aa7c288be5e30df04d84a3d9aa2d14e4bb7.zip |
Now handles an empty disk better. This solves bug report #984690.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4832 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/main.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/main.c b/apps/main.c index b98dfadad6..9ead6e2db3 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -178,7 +178,19 @@ void init(void) | |||
178 | 178 | ||
179 | pinfo = disk_init(); | 179 | pinfo = disk_init(); |
180 | if (!pinfo) | 180 | if (!pinfo) |
181 | panicf("disk: NULL"); | 181 | { |
182 | lcd_clear_display(); | ||
183 | lcd_puts(0, 0, "No partition"); | ||
184 | lcd_puts(0, 1, "table."); | ||
185 | #ifdef HAVE_LCD_BITMAP | ||
186 | lcd_puts(0, 2, "Insert USB cable"); | ||
187 | lcd_puts(0, 3, "and fix it."); | ||
188 | lcd_update(); | ||
189 | #endif | ||
190 | while(button_get(true) != SYS_USB_CONNECTED) {}; | ||
191 | usb_screen(); | ||
192 | system_reboot(); | ||
193 | } | ||
182 | 194 | ||
183 | for ( i=0; i<4; i++ ) { | 195 | for ( i=0; i<4; i++ ) { |
184 | if (!fat_mount(pinfo[i].start)) | 196 | if (!fat_mount(pinfo[i].start)) |