summaryrefslogtreecommitdiff
path: root/rust-src/src/cmd_mount.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust-src/src/cmd_mount.rs')
-rw-r--r--rust-src/src/cmd_mount.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/rust-src/src/cmd_mount.rs b/rust-src/src/cmd_mount.rs
index a75dd21f..3f8253f5 100644
--- a/rust-src/src/cmd_mount.rs
+++ b/rust-src/src/cmd_mount.rs
@@ -4,10 +4,9 @@ use log::{info, debug, error, LevelFilter};
use clap::{Parser};
use uuid::Uuid;
use std::path::PathBuf;
-use crate::{key, transform_c_args};
+use crate::key;
use crate::key::KeyLocation;
-use crate::logger::SimpleLogger;
-use std::ffi::{CString, c_int, c_char, c_void};
+use std::ffi::{CString, c_int, c_char, c_void, OsStr};
use std::os::unix::ffi::OsStrExt;
fn mount_inner(
@@ -222,14 +221,9 @@ fn cmd_mount_inner(opt: Cli) -> anyhow::Result<()> {
Ok(())
}
-#[no_mangle]
-#[allow(clippy::not_unsafe_ptr_arg_deref)]
-pub extern "C" fn cmd_mount(argc: c_int, argv: *const *const c_char) -> c_int {
- transform_c_args!(argv, argc, argv);
+pub fn cmd_mount(argv: Vec<&OsStr>) -> c_int {
let opt = Cli::parse_from(argv);
- log::set_boxed_logger(Box::new(SimpleLogger)).unwrap();
-
// @TODO : more granular log levels via mount option
log::set_max_level(match opt.verbose {
0 => LevelFilter::Warn,