limine: Fix issue with internal modules and kernels in root dir

This commit is contained in:
mintsuki 2023-03-30 02:43:52 +02:00
parent d0df21abb9
commit 012605adf9
2 changed files with 9 additions and 3 deletions

View File

@ -320,7 +320,7 @@ noreturn void limine_load(char *config, char *cmdline) {
strcpy(k_path_ + 1, k_path);
k_path = k_path_;
for (size_t i = strlen(k_path) - 1; ; i--) {
if (k_path[i] == '/') {
if (k_path[i] == '/' || i == 1) {
k_path[i] = 0;
break;
}

View File

@ -65,16 +65,22 @@ struct limine_internal_module internal_module2 = {
.cmdline = "Second internal module"
};
struct limine_internal_module internal_module3 = {
.path = "./limine.cfg",
.cmdline = "Second internal module"
};
struct limine_internal_module *internal_modules[] = {
&internal_module1,
&internal_module2
&internal_module2,
&internal_module3
};
struct limine_module_request module_request = {
.id = LIMINE_MODULE_REQUEST,
.revision = 1, .response = NULL,
.internal_module_count = 2,
.internal_module_count = 3,
.internal_modules = internal_modules
};