From 1013959d1bf1441fc543644705ca21b3eff9120f Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Mon, 21 Oct 2024 11:40:59 +0200 Subject: [PATCH] Return error instead of invoking the unimplemented macro in device files --- src/sys/ata.rs | 2 +- src/sys/clk/boot.rs | 2 +- src/sys/clk/epoch.rs | 2 +- src/sys/rng.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sys/ata.rs b/src/sys/ata.rs index ac4e4443..b38010f4 100644 --- a/src/sys/ata.rs +++ b/src/sys/ata.rs @@ -392,7 +392,7 @@ impl FileIO for Drive { } fn write(&mut self, _buf: &[u8]) -> Result { - unimplemented!(); + Err(()) } fn close(&mut self) { diff --git a/src/sys/clk/boot.rs b/src/sys/clk/boot.rs index ff633d30..bb9e1d64 100644 --- a/src/sys/clk/boot.rs +++ b/src/sys/clk/boot.rs @@ -28,7 +28,7 @@ impl FileIO for BootTime { } fn write(&mut self, _buf: &[u8]) -> Result { - unimplemented!(); + Err(()) } fn close(&mut self) {} diff --git a/src/sys/clk/epoch.rs b/src/sys/clk/epoch.rs index 7512b444..5ce264c0 100644 --- a/src/sys/clk/epoch.rs +++ b/src/sys/clk/epoch.rs @@ -33,7 +33,7 @@ impl FileIO for EpochTime { } fn write(&mut self, _buf: &[u8]) -> Result { - unimplemented!(); + Err(()) } fn close(&mut self) {} diff --git a/src/sys/rng.rs b/src/sys/rng.rs index d4fb29d9..d9e56f89 100644 --- a/src/sys/rng.rs +++ b/src/sys/rng.rs @@ -33,7 +33,7 @@ impl FileIO for Random { } fn write(&mut self, _buf: &[u8]) -> Result { - unimplemented!(); + Err(()) } fn close(&mut self) {}