Skip to content

Commit

Permalink
Merge pull request #3334 from conath/3333-floppy-drive-is-read-only
Browse files Browse the repository at this point in the history
Fix #3333 floppy drive is read only
  • Loading branch information
osy authored Jan 8, 2022
2 parents d3a19ed + 3968ab9 commit da9b162
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Managers/UTMQemuSystem.m
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,10 @@ - (void)argsForDrives {
BOOL removable = (type == UTMDiskImageTypeCD) || [self.configuration driveRemovableForIndex:i];
NSString *identifier = [self.configuration driveNameForIndex:i];
NSString *realInterface = [self expandDriveInterface:interface identifier:identifier removable:removable busInterfaceMap:busInterfaceMap];
BOOL floppy = [realInterface containsString:@"floppy"];
NSString *drive;
[self pushArgv:@"-drive"];
drive = [NSString stringWithFormat:@"if=%@,media=%@,id=%@", realInterface, removable ? @"cdrom" : @"disk", identifier];
drive = [NSString stringWithFormat:@"if=%@,media=%@,id=%@", realInterface, (removable && !floppy) ? @"cdrom" : @"disk", identifier];
if (hasImage) {
drive = [NSString stringWithFormat:@"%@,file=%@,cache=writethrough", drive, fullPathURL.path];
}
Expand Down

0 comments on commit da9b162

Please sign in to comment.