Support cmdline_args when sys_exec.

This commit is contained in:
Yifan Wu 2021-02-26 12:06:55 +08:00
parent c43ec12175
commit c8d851fc2b
16 changed files with 132 additions and 24 deletions

View file

@ -65,8 +65,8 @@ pub fn sys_fork() -> isize {
syscall(SYSCALL_FORK, [0, 0, 0])
}
pub fn sys_exec(path: &str) -> isize {
syscall(SYSCALL_EXEC, [path.as_ptr() as usize, 0, 0])
pub fn sys_exec(path: &str, args: &[*const u8]) -> isize {
syscall(SYSCALL_EXEC, [path.as_ptr() as usize, args.as_ptr() as usize, 0])
}
pub fn sys_waitpid(pid: isize, exit_code: *mut i32) -> isize {