probing.c: added support for MMC devices when boot in LiveCD-mode
This commit is contained in:
parent
c4d274d21a
commit
0cbc6e7994
@ -161,12 +161,16 @@ static void find_media(void)
|
||||
tmp[count].name = strdup(dirent->d_name);
|
||||
tmp[count].type = UNKNOWN_MEDIA;
|
||||
if ((f = fopen(path, "r")) != NULL) {
|
||||
int type;
|
||||
if (fgets(buf, sizeof(buf), f) && sscanf(buf, "%d", &type)) {
|
||||
int type = SCSI_TYPE_DISK;
|
||||
if (fgets(buf, sizeof(buf), f) > 0) {
|
||||
if (strncmp(buf, "MMC", 3) == 0)
|
||||
tmp[count].type = DISK;
|
||||
else if (sscanf(buf, "%d", &type) > 0) {
|
||||
if (type == SCSI_TYPE_DISK) tmp[count].type = DISK;
|
||||
else if (type == SCSI_TYPE_ROM) tmp[count].type = CDROM;
|
||||
else if (type == SCSI_TYPE_TAPE) tmp[count].type = TAPE;
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user