mirror of
https://github.com/limine-bootloader/limine
synced 2025-02-23 20:44:27 +03:00
stivale2: Fix bug where uri_open return value is tested wrong; uri: Allocate new buffer on uri_resolve
This commit is contained in:
parent
e3519a6cfa
commit
352f74daef
BIN
limine-pxe.bin
BIN
limine-pxe.bin
Binary file not shown.
BIN
limine.bin
BIN
limine.bin
Binary file not shown.
@ -12,6 +12,11 @@
|
||||
// A URI takes the form of: resource://root/path
|
||||
// The following function splits up a URI into its componenets
|
||||
bool uri_resolve(char *uri, char **resource, char **root, char **path) {
|
||||
size_t length = strlen(uri) + 1;
|
||||
char *buf = conv_mem_alloc(length);
|
||||
memcpy(buf, uri, length);
|
||||
uri = buf;
|
||||
|
||||
*resource = *root = *path = NULL;
|
||||
|
||||
// Get resource
|
||||
|
@ -183,7 +183,7 @@ void stivale2_load(char *cmdline) {
|
||||
}
|
||||
|
||||
struct file_handle f;
|
||||
if (uri_open(&f, module_file))
|
||||
if (!uri_open(&f, module_file))
|
||||
panic("Requested module with path \"%s\" not found!\n", module_file);
|
||||
|
||||
void *module_addr = (void *)(((uint32_t)top_used_addr & 0xfff) ?
|
||||
|
@ -15,9 +15,15 @@ PROTOCOL=stivale
|
||||
KERNEL_PATH=guid://@GUID@/boot/test.elf
|
||||
KERNEL_CMDLINE=Hi! This is an example!
|
||||
|
||||
MODULE_PATH=bios://:1/boot/test.elf
|
||||
MODULE_STRING=yooooo
|
||||
|
||||
:Stivale2 Test
|
||||
|
||||
PROTOCOL=stivale2
|
||||
RESOLUTION=640x480x16
|
||||
KERNEL_PATH=bios://:1/boot/test.elf
|
||||
KERNEL_CMDLINE=Woah! Another example!
|
||||
|
||||
MODULE_PATH=guid://@GUID@/boot/test.elf
|
||||
MODULE_STRING=yooooo
|
||||
|
Loading…
x
Reference in New Issue
Block a user