From 4b95068faccdab26a411bcee17c2a59aec9fe7bc Mon Sep 17 00:00:00 2001 From: AzureMarker Date: Mon, 24 Jan 2022 16:45:07 -0800 Subject: [PATCH] Remove the sdmc module The SD card is automatically mounted by libctru on startup, so this isn't needed anymore. --- ctru-rs/src/lib.rs | 2 -- ctru-rs/src/sdmc.rs | 20 -------------------- 2 files changed, 22 deletions(-) delete mode 100644 ctru-rs/src/sdmc.rs diff --git a/ctru-rs/src/lib.rs b/ctru-rs/src/lib.rs index a323060..6669c60 100644 --- a/ctru-rs/src/lib.rs +++ b/ctru-rs/src/lib.rs @@ -33,7 +33,6 @@ pub mod applets; pub mod console; pub mod error; pub mod gfx; -pub mod sdmc; pub mod services; pub mod srv; pub mod thread; @@ -57,5 +56,4 @@ pub mod romfs { pub use crate::error::{Error, Result}; pub use crate::gfx::Gfx; -pub use crate::sdmc::Sdmc; pub use crate::srv::Srv; diff --git a/ctru-rs/src/sdmc.rs b/ctru-rs/src/sdmc.rs deleted file mode 100644 index eaef331..0000000 --- a/ctru-rs/src/sdmc.rs +++ /dev/null @@ -1,20 +0,0 @@ -pub struct Sdmc(()); - -impl Sdmc { - pub fn init() -> crate::Result { - unsafe { - let r = ctru_sys::archiveMountSdmc(); - if r < 0 { - Err(r.into()) - } else { - Ok(Sdmc(())) - } - } - } -} - -impl Drop for Sdmc { - fn drop(&mut self) { - unsafe { ctru_sys::archiveUnmountAll() }; - } -}