summaryrefslogtreecommitdiff
path: root/apps/main.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-07-05 22:13:20 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-07-05 22:13:20 +0000
commit15124aa7c288be5e30df04d84a3d9aa2d14e4bb7 (patch)
treed11e4f3ec3cd6a54c281506e0913055319f27fc8 /apps/main.c
parentbd1f0304112ee92a1bd87e8bf7a3c697ed868938 (diff)
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
Diffstat (limited to 'apps/main.c')
-rw-r--r--apps/main.c14
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)
pinfo = disk_init();
if (!pinfo)
- panicf("disk: NULL");
+ {
+ lcd_clear_display();
+ lcd_puts(0, 0, "No partition");
+ lcd_puts(0, 1, "table.");
+#ifdef HAVE_LCD_BITMAP
+ lcd_puts(0, 2, "Insert USB cable");
+ lcd_puts(0, 3, "and fix it.");
+ lcd_update();
+#endif
+ while(button_get(true) != SYS_USB_CONNECTED) {};
+ usb_screen();
+ system_reboot();
+ }
for ( i=0; i<4; i++ ) {
if (!fat_mount(pinfo[i].start))