Skip to content

Commit 691497b

Browse files
committed
system: add floppy bootindex for q35
Other targets will not have bootorder but they will not be used often. Fixes #2492
1 parent c3b5463 commit 691497b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Managers/UTMQemuSystem.m

+5
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ - (NSString *)expandDriveInterface:(NSString *)interface identifier:(NSString *)
192192
} else if ([interface isEqualToString:@"usb"]) {
193193
[self pushArgv:@"-device"];
194194
[self pushArgv:[NSString stringWithFormat:@"usb-storage,drive=%@,removable=%@,bootindex=%lu", identifier, removable ? @"true" : @"false", bootindex++]];
195+
} else if ([interface isEqualToString:@"floppy"] && [self.configuration.systemTarget hasPrefix:@"q35"]) {
196+
[self pushArgv:@"-device"];
197+
[self pushArgv:[NSString stringWithFormat:@"isa-fdc,id=fdc%lu,bootindexA=%lu", busindex, bootindex++]];
198+
[self pushArgv:@"-device"];
199+
[self pushArgv:[NSString stringWithFormat:@"floppy,unit=0,bus=fdc%lu.0,drive=%@", busindex++, identifier]];
195200
} else {
196201
return interface; // no expand needed
197202
}

0 commit comments

Comments
 (0)