Fix some module loading silliness
This commit is contained in:
parent
cf2bad7886
commit
75a7d5e7f2
@ -142,10 +142,13 @@ int kmain(struct multiboot *mboot, uint32_t mboot_mag, uintptr_t esp) {
|
||||
|
||||
debug_print(NOTICE, "Loading a module: 0x%x:0x%x", module_start, module_end);
|
||||
module_data_t * mod_info = (module_data_t *)module_load_direct((void *)(module_start), module_size);
|
||||
debug_print(NOTICE, "Loaded: %s", mod_info->mod_info->name);
|
||||
if (mod_info) {
|
||||
debug_print(NOTICE, "Loaded: %s", mod_info->mod_info->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Map /dev to a device mapper */
|
||||
map_vfs_directory("/dev");
|
||||
|
||||
|
@ -772,15 +772,6 @@ static void debug_shell_run(void * data, char * name) {
|
||||
current_process->fds->entries[2] = tty;
|
||||
|
||||
/* Initialize the shell commands map */
|
||||
if (!shell_commands_map) {
|
||||
shell_commands_map = hashmap_create(10);
|
||||
struct shell_command * sh = &shell_commands[0];
|
||||
while (sh->name) {
|
||||
hashmap_set(shell_commands_map, sh->name, sh);
|
||||
sh++;
|
||||
}
|
||||
}
|
||||
|
||||
int retval = 0;
|
||||
|
||||
while (1) {
|
||||
@ -815,6 +806,14 @@ static void debug_shell_run(void * data, char * name) {
|
||||
}
|
||||
|
||||
int debug_shell_start(void) {
|
||||
/* Setup shell commands */
|
||||
shell_commands_map = hashmap_create(10);
|
||||
struct shell_command * sh = &shell_commands[0];
|
||||
while (sh->name) {
|
||||
hashmap_set(shell_commands_map, sh->name, sh);
|
||||
sh++;
|
||||
}
|
||||
|
||||
int i = create_kernel_tasklet(debug_shell_run, "[kttydebug]", NULL);
|
||||
debug_print(NOTICE, "Started tasklet with pid=%d", i);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user