summaryrefslogtreecommitdiff
path: root/src/init/main.c
diff options
context:
space:
mode:
authordzwdz2022-06-29 21:52:15 +0200
committerdzwdz2022-06-29 21:52:15 +0200
commitbf4cbc830d78774ac00d9501c45e8b84d0ae9ae7 (patch)
treef302f92badf74dade9e724e37f85d1ee2dd99833 /src/init/main.c
parent43de6a4d8ead1e609828ef34ad1957d34c94ee6a (diff)
kernel/vfs: add the OPEN_CREATE flag
Diffstat (limited to 'src/init/main.c')
-rw-r--r--src/init/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/init/main.c b/src/init/main.c
index 998db9c..198bd88 100644
--- a/src/init/main.c
+++ b/src/init/main.c
@@ -19,7 +19,7 @@ int main(void) {
// allocate bss
_syscall_memflag(&_bss_start, &_bss_end - &_bss_start, MEMFLAG_PRESENT);
- file_open(&__stdout, "/com1");
+ file_open(&__stdout, "/com1", 0);
printf("preinit\n");
MOUNT("/init/", tar_driver(&_initrd));
@@ -48,7 +48,7 @@ int main(void) {
}
if (!_syscall_fork(0, NULL)) {
- if (file_open(&__stdout, "/com1") < 0 || file_open(&__stdin, "/com1") < 0)
+ if (file_open(&__stdout, "/com1", 0) < 0 || file_open(&__stdin, "/com1", 0) < 0)
_syscall_exit(1);
shell_loop();
@@ -57,10 +57,10 @@ int main(void) {
if (!_syscall_fork(0, NULL)) {
- if (file_open(&__stdout, "/vga_tty") < 0)
+ if (file_open(&__stdout, "/vga_tty", 0) < 0)
_syscall_exit(1);
- if (file_open(&__stdin, "/keyboard") < 0) {
+ if (file_open(&__stdin, "/keyboard", 0) < 0) {
printf("couldn't open /keyboard\n");
_syscall_exit(1);
}
@@ -71,8 +71,8 @@ int main(void) {
// try to find any working output
- if (file_open(&__stdout, "/com1") < 0)
- file_open(&__stdout, "/vga_tty");
+ if (file_open(&__stdout, "/com1", 0) < 0)
+ file_open(&__stdout, "/vga_tty", 0);
_syscall_await();
printf("init: quitting\n");