diff --git a/src/bus.rs b/src/bus.rs index 5bd41ec..d86d816 100644 --- a/src/bus.rs +++ b/src/bus.rs @@ -77,13 +77,13 @@ impl Bus { match operation { 0x10 => { - // we're reading the current mount state of the specified disk id + // we're reading the current insert state of the specified disk id if address_or_id > 3 { panic!("invalid disk ID"); } match &self.disk_controller.disk[address_or_id] { - Some(disk) => disk.size as u32, // return size if this disk is mounted - None => 0, // return 0 if this disk is not mounted + Some(disk) => disk.size as u32, // return size if this disk is inserted + None => 0, // return 0 if this disk is not inserted } } 0x20 => { @@ -165,13 +165,13 @@ impl Bus { match operation { 0x10 => { - // we're requesting a disk to be mounted to the specified disk id + // we're requesting a disk to be inserted to the specified disk id if address_or_id > 3 { panic!("invalid disk ID"); } let file = self.disk_controller.select_file(); match file { - Some(file) => self.disk_controller.mount(file, address_or_id as u8), + Some(file) => self.disk_controller.insert(file, address_or_id as u8), None => {}, }; } diff --git a/src/disk.rs b/src/disk.rs index 96fb998..291d2e7 100644 --- a/src/disk.rs +++ b/src/disk.rs @@ -38,17 +38,17 @@ impl DiskController { .add_filter("f32 Binary", &["f32"]) .add_filter("Raw Binary", &["bin"]) .add_filter("All Files", &["*"]) - .set_title(&format!("Select a file to mount")) + .set_title(&format!("Select a file to insert")) .pick_file(); match path { Some(path) => Some(File::open(path).unwrap()), None => None, } } - pub fn mount(&mut self, file: File, disk_id: u8) { + pub fn insert(&mut self, file: File, disk_id: u8) { self.disk[disk_id as usize] = Some(Disk::new(file)); } - pub fn unmount(&mut self, disk_id: u8) { + pub fn remove(&mut self, disk_id: u8) { self.disk[disk_id as usize] = None; } pub fn get_size(&mut self, disk_id: u8) -> u64 {