Debug message changes

This commit is contained in:
pjht 2020-09-06 08:11:12 -05:00
parent 3367cdc9bf
commit 57f4a32e77
4 changed files with 4 additions and 9 deletions

View File

@ -82,7 +82,7 @@ int main() {
rpc_register_func("open",&open); rpc_register_func("open",&open);
rpc_register_func("register_dev",&register_dev); rpc_register_func("register_dev",&register_dev);
register_fs("devfs",getpid()); register_fs("devfs",getpid());
serial_print("Initialized devfs\n"); serial_print("Devfs initialized\n");
rpc_mark_as_init(); rpc_mark_as_init();
} }

View File

@ -94,7 +94,6 @@ char load_proc(size_t datapos,char* initrd) {
int main() { int main() {
serial_print("Init running\n");
long size=initrd_sz(); long size=initrd_sz();
char* initrd=malloc(size); char* initrd=malloc(size);
initrd_get(initrd); initrd_get(initrd);
@ -112,20 +111,17 @@ int main() {
datapos=find_loc("initrd_drv",initrd); datapos=find_loc("initrd_drv",initrd);
load_proc(datapos,initrd); load_proc(datapos,initrd);
while(rpc_is_init(4)==0); while(rpc_is_init(4)==0);
serial_print("Loading tar_fs\n");
datapos=find_loc("tar_fs",initrd); datapos=find_loc("tar_fs",initrd);
load_proc(datapos,initrd); load_proc(datapos,initrd);
while(rpc_is_init(5)==0); while(rpc_is_init(5)==0);
serial_print("Mounting initrd\n"); serial_print("Mounting initrd\n");
mount("/dev/initrd","tarfs","/initrd"); mount("/dev/initrd","tarfs","/initrd");
serial_print("Loading VGA driver\n");
posix_spawn(NULL,"/initrd/vga_drv",NULL,NULL,NULL,NULL); posix_spawn(NULL,"/initrd/vga_drv",NULL,NULL,NULL,NULL);
while(rpc_is_init(6)==0); while(rpc_is_init(6)==0);
stdout=fopen("/dev/vga","w"); stdout=fopen("/dev/vga","w");
if (!stdout) { if (!stdout) {
serial_print("Could not open the VGA file! \n"); serial_print("Could not open the VGA device file!\n");
exit(1); exit(1);
} }
serial_print("Loading PCI driver\n");
posix_spawn(NULL,"/initrd/pci",NULL,NULL,NULL,NULL); posix_spawn(NULL,"/initrd/pci",NULL,NULL,NULL,NULL);
} }

View File

@ -133,8 +133,7 @@ int main() {
rpc_register_func("mount",&tar_fs_mount); rpc_register_func("mount",&tar_fs_mount);
rpc_register_func("open",&open); rpc_register_func("open",&open);
rpc_register_func("read",&read); rpc_register_func("read",&read);
serial_print("Registering tarfs filesystem\n");
register_fs("tarfs",getpid()); register_fs("tarfs",getpid());
serial_print("Initialized tarfs\n"); serial_print("Tarfs initialized\n");
rpc_mark_as_init(); rpc_mark_as_init();
} }

View File

@ -31,6 +31,6 @@ int main() {
serialize_int(getpid(),&state); serialize_int(getpid(),&state);
rpc_call(3,"register_dev",state.buf,state.sizeorpos); rpc_call(3,"register_dev",state.buf,state.sizeorpos);
free(state.buf); free(state.buf);
serial_print("VGA driver initialized\n"); vga_write_string("[INFO] VGA driver initialized\n");
rpc_mark_as_init(); rpc_mark_as_init();
} }