Open disks as read-write
This commit is contained in:
parent
9059889d3d
commit
bf48300f2f
|
@ -43,7 +43,7 @@ impl DiskController {
|
||||||
.set_title(&format!("Select a file to insert"))
|
.set_title(&format!("Select a file to insert"))
|
||||||
.pick_file();
|
.pick_file();
|
||||||
match path {
|
match path {
|
||||||
Some(path) => Some(File::open(path).expect("failed to open disk image")),
|
Some(path) => Some(File::options().read(true).write(true).open(path).expect("failed to open disk image")),
|
||||||
None => None,
|
None => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ fn main() {
|
||||||
let mut args_iter = args.iter();
|
let mut args_iter = args.iter();
|
||||||
args_iter.next();
|
args_iter.next();
|
||||||
for (i, arg) in args_iter.enumerate() {
|
for (i, arg) in args_iter.enumerate() {
|
||||||
bus.disk_controller.insert(File::open(&arg).expect("failed to load provided disk image"), i as u8);
|
bus.disk_controller.insert(File::options().read(true).write(true).open(&arg).expect("failed to load provided disk image"), i as u8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user