fix error in type conversion

This commit is contained in:
Sangbum Kim 2024-09-23 04:21:12 +09:00
parent d117255eaf
commit 2e653268c8
2 changed files with 2 additions and 2 deletions

View File

@ -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() {

View File

@ -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();