If no filesystem, fail configstuff quickly

This commit is contained in:
Stefan `Sec` Zehl 2011-07-26 02:04:41 +02:00
parent cb5ebc57d8
commit 3d701fda1b
1 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,9 @@ int lcdInitConfig(){
lcdPrint("open:"); lcdPrint("open:");
lcdPrintln(f_get_rc_string(res)); lcdPrintln(f_get_rc_string(res));
if(res){ if(res){
if(res==FR_NO_FILESYSTEM)
return 1;
lcdPrintln("new r0ket.cfg..."); lcdPrintln("new r0ket.cfg...");
res=f_open(&file, "r0ket.cfg", FA_OPEN_ALWAYS|FA_WRITE); res=f_open(&file, "r0ket.cfg", FA_OPEN_ALWAYS|FA_WRITE);