DISK: Force Read Only for all ISO container attach operations
ISO files and real CDs exist which don't have ISO 9660 file structure. These do contain ODS2 file systems since they were produced before ISO 9660 was standardized and certainly before OS support for ISO 9660 was added. As such, any file named .iso or .ISO will always be attached read-only since CDs are never naturally writable devices.
This commit is contained in:
parent
406c6af944
commit
6cac5c9eae
1 changed files with 11 additions and 1 deletions
12
sim_disk.c
12
sim_disk.c
|
@ -2290,8 +2290,18 @@ if (pseudo_filesystem_size != 0) { /* Dummy file system size mechanism? */
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; checks[i] != NULL; i++)
|
for (i = 0; checks[i] != NULL; i++)
|
||||||
if ((ret_val = checks[i] (uptr, 0, readonly)) != (t_offset)-1)
|
if ((ret_val = checks[i] (uptr, 0, readonly)) != (t_offset)-1) {
|
||||||
|
/* ISO files that haven't already been determined to be ISO 9660
|
||||||
|
* which contain a known file system are also marked read-only
|
||||||
|
* now. This fits early DEC distribution CDs that were created
|
||||||
|
* before ISO 9660 was standardized and operating support was added.
|
||||||
|
*/
|
||||||
|
if ((readonly != NULL) &&
|
||||||
|
(*readonly == FALSE) &&
|
||||||
|
(NULL != match_ext (uptr->filename, "ISO")))
|
||||||
|
*readonly = TRUE;
|
||||||
return ret_val;
|
return ret_val;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* The only known interleaved disk devices have either 256 byte
|
* The only known interleaved disk devices have either 256 byte
|
||||||
* or 128 byte sector sizes. If additional interleaved file
|
* or 128 byte sector sizes. If additional interleaved file
|
||||||
|
|
Loading…
Add table
Reference in a new issue