git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change of vterm handling logic on backend chardev input event (#40)
[lunaix-os.git]
/
lunaix-os
/
kernel
/
lunad.c
diff --git
a/lunaix-os/kernel/lunad.c
b/lunaix-os/kernel/lunad.c
index 99cd066927dc9e8b9fc6f19d556f9b077204d064..ff52e714c87b0e160b5ca5c7d8bb258388d2075b 100644
(file)
--- a/
lunaix-os/kernel/lunad.c
+++ b/
lunaix-os/kernel/lunad.c
@@
-41,8
+41,10
@@
int
exec_initd()
{
int errno = 0;
exec_initd()
{
int errno = 0;
+ const char* argv[] = { "/mnt/lunaix-os/usr/bin/init", 0 };
+ const char* envp[] = { 0 };
- if ((errno = exec_kexecve(
"/mnt/lunaix-os/usr/bin/init", NULL, NULL
))) {
+ if ((errno = exec_kexecve(
argv[0], argv, envp
))) {
goto fail;
}
goto fail;
}
@@
-57,7
+59,7
@@
static void
lunad_do_usr() {
// No, these are not preemptive
cpu_disable_interrupt();
lunad_do_usr() {
// No, these are not preemptive
cpu_disable_interrupt();
-
+
if (!mount_bootmedium() || !exec_initd()) {
fail("failed to initd");
}
if (!mount_bootmedium() || !exec_initd()) {
fail("failed to initd");
}
@@
-74,12
+76,6
@@
lunad_do_usr() {
void _preemptible
lunad_main()
{
void _preemptible
lunad_main()
{
- /*
- * We must defer boot code/data cleaning to here, after we successfully
- * escape that area
- */
- boot_cleanup();
-
spawn_kthread((ptr_t)init_platform);
/*
spawn_kthread((ptr_t)init_platform);
/*