mirror of
https://github.com/erichelgeson/BlueSCSI.git
synced 2024-05-31 17:41:27 +00:00
Allow optical files that are set to RO on the SD card to be used
This commit is contained in:
parent
142117c83a
commit
927f8101fa
|
@ -593,8 +593,6 @@ void findDriveImages(FsFile root) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid file, open for reading/writing.
|
// Valid file, open for reading/writing.
|
||||||
file = SD.open(name, O_RDWR);
|
|
||||||
if(file && file.isFile()) {
|
|
||||||
SCSI_DEVICE_TYPE device_type;
|
SCSI_DEVICE_TYPE device_type;
|
||||||
if(tolower(name[1]) != 'd') {
|
if(tolower(name[1]) != 'd') {
|
||||||
file.close();
|
file.close();
|
||||||
|
@ -602,15 +600,20 @@ void findDriveImages(FsFile root) {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (tolower(name[0])) {
|
switch (tolower(name[0])) {
|
||||||
case 'h': device_type = SCSI_DEVICE_HDD;
|
case 'h':
|
||||||
|
device_type = SCSI_DEVICE_HDD;
|
||||||
|
file = SD.open(name, O_RDWR);
|
||||||
break;
|
break;
|
||||||
case 'c': device_type = SCSI_DEVICE_OPTICAL;
|
case 'c':
|
||||||
|
device_type = SCSI_DEVICE_OPTICAL;
|
||||||
|
file = SD.open(name, O_RDONLY);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
file.close();
|
file.close();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(file && file.isFile()) {
|
||||||
// Defaults for Hard Disks
|
// Defaults for Hard Disks
|
||||||
int id = 1; // 0 and 3 are common in Macs for physical HD and CD, so avoid them.
|
int id = 1; // 0 and 3 are common in Macs for physical HD and CD, so avoid them.
|
||||||
int lun = 0;
|
int lun = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user