Skip to content

Commit

Permalink
Return error instead of invoking the unimplemented macro in device files
Browse files Browse the repository at this point in the history
  • Loading branch information
vinc committed Oct 21, 2024
1 parent ce35b79 commit 1013959
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/sys/ata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ impl FileIO for Drive {
}

fn write(&mut self, _buf: &[u8]) -> Result<usize, ()> {
unimplemented!();
Err(())
}

fn close(&mut self) {
Expand Down
2 changes: 1 addition & 1 deletion src/sys/clk/boot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl FileIO for BootTime {
}

fn write(&mut self, _buf: &[u8]) -> Result<usize, ()> {
unimplemented!();
Err(())
}

fn close(&mut self) {}
Expand Down
2 changes: 1 addition & 1 deletion src/sys/clk/epoch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl FileIO for EpochTime {
}

fn write(&mut self, _buf: &[u8]) -> Result<usize, ()> {
unimplemented!();
Err(())
}

fn close(&mut self) {}
Expand Down
2 changes: 1 addition & 1 deletion src/sys/rng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl FileIO for Random {
}

fn write(&mut self, _buf: &[u8]) -> Result<usize, ()> {
unimplemented!();
Err(())
}

fn close(&mut self) {}
Expand Down

0 comments on commit 1013959

Please sign in to comment.