minor changes

This commit is contained in:
tantricity 2010-06-26 19:33:19 +00:00
parent 9b55efe66d
commit eb73138455

View File

@ -29,6 +29,7 @@
#include <sys/iosupport.h> #include <sys/iosupport.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <stdio.h>
#include "common.h" #include "common.h"
#include "partition.h" #include "partition.h"
@ -74,17 +75,17 @@ bool fatMount (const char* name, const DISC_INTERFACE* interface, sec_t startSec
if(!name || !interface) if(!name || !interface)
return false; return false;
char devname[10];
sprintf(devname, "%s:", name);
if(FindDevice(devname) >= 0)
return false;
if(!interface->startup()) if(!interface->startup())
return false; return false;
if(!interface->isInserted()) if(!interface->isInserted())
return false; return false;
char devname[10];
sprintf(devname, "%s:", name);
if(FindDevice(devname) >= 0)
return true;
devops = _FAT_mem_allocate (sizeof(devoptab_t) + strlen(name) + 1); devops = _FAT_mem_allocate (sizeof(devoptab_t) + strlen(name) + 1);
if (!devops) { if (!devops) {
return false; return false;