diff --git a/init/init.c b/init/init.c index fcca256..d7c0a11 100644 --- a/init/init.c +++ b/init/init.c @@ -27,7 +27,7 @@ void receiver (void* arg) { void app_main (void) { debug_printf ("Init process is running. Starting user shell...\n"); - int ce_pid = exec ("SYS", "/ce"); + int ce_pid = exec ("sys", "/ce"); ce_pgid = get_procgroup (ce_pid); process_spawn (&receiver, NULL); diff --git a/kernel/amd64/bootmain.c b/kernel/amd64/bootmain.c index 28b3b87..0159284 100644 --- a/kernel/amd64/bootmain.c +++ b/kernel/amd64/bootmain.c @@ -72,11 +72,11 @@ void bootmain (void) { struct reschedule_ctx rctx; memset (&rctx, 0, sizeof (rctx)); - struct device* sys0 = device_find ("SYS0"); - vfs_create_volume (thiscpu->kproc, &rctx, "SYS", FS_TARFS, sys0, false); + struct device* sys0 = device_find ("sys0"); + vfs_create_volume (thiscpu->kproc, &rctx, "sys", FS_TARFS, sys0, false); - struct device* temp0 = device_find ("TEMP0"); - vfs_create_volume (thiscpu->kproc, &rctx, "TEMP", FS_FAT16, temp0, true); + struct device* temp0 = device_find ("temp0"); + vfs_create_volume (thiscpu->kproc, &rctx, "temp", FS_FAT16, temp0, true); smp_init (); diff --git a/kernel/amd64/smp.c b/kernel/amd64/smp.c index d3346e0..165ceb9 100644 --- a/kernel/amd64/smp.c +++ b/kernel/amd64/smp.c @@ -111,7 +111,7 @@ static void smp_bootstrap (struct limine_mp_info* mp_info) { struct reschedule_ctx rctx; memset (&rctx, 0, sizeof (rctx)); - struct proc* spin_proc = proc_from_file (thiscpu->kproc, "SYS", "/spin", &rctx); + struct proc* spin_proc = proc_from_file (thiscpu->kproc, "sys", "/spin", &rctx); proc_register (spin_proc, thiscpu, &rctx); spin_lock (&spin_proc->cpu->lock, &fc); diff --git a/kernel/device/device.c b/kernel/device/device.c index 1727ba2..a4e1600 100644 --- a/kernel/device/device.c +++ b/kernel/device/device.c @@ -98,7 +98,7 @@ static void debugconsole_device_init (void) { device_op_func_t ops[] = { [DEBUGCONSOLE_PUTSTR] = &debugconsole_putstr, }; - device_create ("DEBUGCONSOLE", ops, lengthof (ops), &debugconsole_init, &debugconsole_fini, NULL, + device_create ("debugconsole", ops, lengthof (ops), &debugconsole_init, &debugconsole_fini, NULL, thiscpu->kproc, &rctx); } @@ -110,7 +110,7 @@ static void terminal_device_init (void) { [TERMINAL_PUTSTR] = &terminal_putstr, [TERMINAL_DIMENSIONS] = &terminal_dimensions, }; - device_create ("TERMINAL", ops, lengthof (ops), &terminal_init, &terminal_fini, NULL, + device_create ("terminal", ops, lengthof (ops), &terminal_init, &terminal_fini, NULL, thiscpu->kproc, &rctx); } @@ -155,7 +155,7 @@ static void sys_device_init (void) { .sector_size = 512, .buffer = unpack_buffer, }; - device_create ("SYS0", ops, lengthof (ops), &ramdrv_init, &ramdrv_fini, &init, thiscpu->kproc, + device_create ("sys0", ops, lengthof (ops), &ramdrv_init, &ramdrv_fini, &init, thiscpu->kproc, &rctx); LZ4F_freeDecompressionContext (dctx); @@ -177,7 +177,7 @@ static void temp_device_init (void) { .total_size = 1024 * 1024 * 20, .sector_size = 512, }; - device_create ("TEMP0", ops, lengthof (ops), &ramdrv_init, &ramdrv_fini, &init, thiscpu->kproc, + device_create ("temp0", ops, lengthof (ops), &ramdrv_init, &ramdrv_fini, &init, thiscpu->kproc, &rctx); } @@ -189,7 +189,7 @@ static void ps2kb_device_init (void) { device_op_func_t ops[] = { [KB_READ_KEY] = &ps2kb_read_key, }; - device_create ("KB", ops, lengthof (ops), &ps2kb_init, &ps2kb_fini, NULL, thiscpu->kproc, &rctx); + device_create ("kb", ops, lengthof (ops), &ps2kb_init, &ps2kb_fini, NULL, thiscpu->kproc, &rctx); } #endif diff --git a/kernel/device/pci_ide.c b/kernel/device/pci_ide.c index e085715..1e56daa 100644 --- a/kernel/device/pci_ide.c +++ b/kernel/device/pci_ide.c @@ -38,7 +38,7 @@ static void ide_make_device (struct proc* proc, struct reschedule_ctx* rctx, probe.devno, probe.sector_size, probe.sector_count); char device_key[fieldsizeof (struct device, key)]; - snprintf (device_key, sizeof (device_key), "IDE%d", ide_counter++); + snprintf (device_key, sizeof (device_key), "ide%d", ide_counter++); device_op_func_t ops[] = { [XDRV_GET_SIZE] = &idedrv_get_size, diff --git a/kernel/proc/proc.c b/kernel/proc/proc.c index f4ab159..4248b30 100644 --- a/kernel/proc/proc.c +++ b/kernel/proc/proc.c @@ -339,10 +339,10 @@ void proc_init (void) { struct reschedule_ctx rctx; memset (&rctx, 0, sizeof (rctx)); - struct proc* spin_proc = proc_from_file (thiscpu->kproc, "SYS", "/spin", &rctx); + struct proc* spin_proc = proc_from_file (thiscpu->kproc, "sys", "/spin", &rctx); proc_register (spin_proc, thiscpu, &rctx); - struct proc* init = proc_from_file (thiscpu->kproc, "SYS", "/init", &rctx); + struct proc* init = proc_from_file (thiscpu->kproc, "sys", "/init", &rctx); proc_register (init, thiscpu, &rctx); spin_lock (&spin_proc->cpu->lock, &fc); diff --git a/libdebugconsole/debugconsole.c b/libdebugconsole/debugconsole.c index d4fd5fb..a0a4823 100644 --- a/libdebugconsole/debugconsole.c +++ b/libdebugconsole/debugconsole.c @@ -6,7 +6,7 @@ #include int debugconsole_print (const char* string, size_t len) { - return device_do ("DEBUGCONSOLE", DEBUGCONSOLE_PUTSTR, (void*)string, (void*)&len, NULL, NULL); + return device_do ("debugconsole", DEBUGCONSOLE_PUTSTR, (void*)string, (void*)&len, NULL, NULL); } void debug_printf (const char* fmt, ...) { diff --git a/libkb/kb.c b/libkb/kb.c index 3d0a572..b67041e 100644 --- a/libkb/kb.c +++ b/libkb/kb.c @@ -6,7 +6,7 @@ int kb_read_key (void) { char ch = 0; - int r = device_do ("KB", KB_READ_KEY, &ch, NULL, NULL, NULL); + int r = device_do ("kb", KB_READ_KEY, &ch, NULL, NULL, NULL); if (r == ST_OK) return (int)ch; diff --git a/libterminal/terminal.c b/libterminal/terminal.c index 3556865..e8e1389 100644 --- a/libterminal/terminal.c +++ b/libterminal/terminal.c @@ -3,9 +3,9 @@ #include void terminal_print (const char* string, size_t len) { - device_do ("TERMINAL", TERMINAL_PUTSTR, (void*)string, &len, NULL, NULL); + device_do ("terminal", TERMINAL_PUTSTR, (void*)string, &len, NULL, NULL); } void terminal_dimensions (size_t* cols, size_t* rows) { - device_do ("TERMINAL", TERMINAL_DIMENSIONS, (void*)cols, (void*)rows, NULL, NULL); + device_do ("terminal", TERMINAL_DIMENSIONS, (void*)cols, (void*)rows, NULL, NULL); }