fix error in type conversion
This commit is contained in:
parent
d117255eaf
commit
2e653268c8
|
@ -123,7 +123,7 @@ fn replace_root() -> Result<(), String> {
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
unsafe extern "C" fn main(_argc: c_int, argv: *mut *const u8) -> c_int {
|
||||
unsafe extern "C" fn main(_argc: c_int, argv: *mut *const i8) -> c_int {
|
||||
init_kmsg();
|
||||
|
||||
match replace_root() {
|
||||
|
|
|
@ -130,7 +130,7 @@ pub(crate) fn do_rmdir(path: &str) -> SystemResult {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn do_execv(path: &str, argv: *mut *const u8) -> SystemResult {
|
||||
pub(crate) fn do_execv(path: &str, argv: *mut *const i8) -> SystemResult {
|
||||
let raw_init_path = CString::new(path).unwrap();
|
||||
unsafe {
|
||||
*argv = raw_init_path.as_ref().as_ptr();
|
||||
|
|
Loading…
Reference in New Issue