Finish up fexec migration

This commit is contained in:
jD91mZM2
2018-08-13 14:46:17 +02:00
parent 66d7aa8553
commit 128209788c
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -98,7 +98,9 @@ pub unsafe extern "C" fn _start_rust(sp: &'static Stack) -> ! {
platform::exit(main(
argc,
argv,
envp
// not envp, because programs like bash try to modify this *const*
// pointer :|
platform::environ as *const *const c_char
));
}
+2 -2
View File
@@ -219,7 +219,7 @@ pub unsafe extern "C" fn execve(
while *arg.offset(len) != 0 {
len += 1;
}
args.push([*arg as usize, len as usize]);
args.push([arg as usize, len as usize]);
argv = argv.offset(1);
}
@@ -236,7 +236,7 @@ pub unsafe extern "C" fn execve(
while *env.offset(len) != 0 {
len += 1;
}
envs.push([*env as usize, len as usize]);
envs.push([env as usize, len as usize]);
envp = envp.offset(1);
}