mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-26 10:49:21 +00:00
Block all CDROMs in /dev/
This commit is contained in:
parent
787661f80f
commit
85bcff03d4
@ -51,8 +51,6 @@ void prefs_exit()
|
||||
}
|
||||
#endif
|
||||
|
||||
#define DEFAULT_CDROM_PATH "/dev/poll/cdrom"
|
||||
|
||||
@implementation VMSettingsController
|
||||
|
||||
+ (id) sharedInstance
|
||||
@ -123,7 +121,7 @@ static NSString *getStringFromPrefs(const char *key)
|
||||
index = 0;
|
||||
while ((dsk = PrefsFindString("cdrom", index++)) != NULL) {
|
||||
NSString *path = [NSString stringWithUTF8String: dsk ];
|
||||
if (![path isEqualToString:@DEFAULT_CDROM_PATH]) {
|
||||
if (![path hasPrefix:@"/dev/"]) {
|
||||
DiskType *disk = [[[DiskType alloc] init] autorelease];
|
||||
[disk setPath:[NSString stringWithUTF8String: dsk ]];
|
||||
[disk setIsCDROM:YES];
|
||||
@ -419,8 +417,6 @@ static NSString *makeRelativeIfNecessary(NSString *path)
|
||||
PrefsAddString([d isCDROM] ? "cdrom" : "disk", [[d path] UTF8String]);
|
||||
}
|
||||
|
||||
PrefsAddString("cdrom", DEFAULT_CDROM_PATH);
|
||||
|
||||
PrefsReplaceInt32("bootdriver", ([bootFrom indexOfSelectedItem] == 1 ? CDROMRefNum : 0));
|
||||
PrefsReplaceString("rom", [[romFile stringValue] UTF8String]);
|
||||
PrefsReplaceString("extfs", [[unixRoot stringValue] UTF8String]);
|
||||
|
Loading…
Reference in New Issue
Block a user