Skip to content
Snippets Groups Projects
Verified Commit df91c67c authored by Jacob Lorentzon's avatar Jacob Lorentzon
Browse files

Implement redox_mkfs_v1.

parent 70abce96
No related branches found
No related tags found
No related merge requests found
Pipeline #14573 passed
...@@ -3,7 +3,9 @@ use core::{slice, str}; ...@@ -3,7 +3,9 @@ use core::{slice, str};
use syscall::{Error, Result, WaitFlags, EMFILE}; use syscall::{Error, Result, WaitFlags, EMFILE};
use crate::{ use crate::{
header::{errno::EINVAL, signal::sigaction, sys_stat::UTIME_NOW, time::timespec}, header::{
errno::EINVAL, signal::sigaction, sys_stat::UTIME_NOW, sys_uio::iovec, time::timespec,
},
platform::types::*, platform::types::*,
}; };
...@@ -319,3 +321,18 @@ pub unsafe extern "C" fn redox_strerror_v1( ...@@ -319,3 +321,18 @@ pub unsafe extern "C" fn redox_strerror_v1(
Ok(len) Ok(len)
})()) })())
} }
#[no_mangle]
pub unsafe extern "C" fn redox_mkns_v1(
names: *const iovec,
num_names: usize,
flags: u32,
) -> RawResult {
Error::mux((|| {
if flags != 0 {
return Err(Error::new(EINVAL));
}
// Kernel does the UTF-8 validation.
syscall::mkns(core::slice::from_raw_parts(names.cast(), num_names))
})())
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment