config: Search for tomatboot.cfg config files as well
This commit is contained in:
parent
ed0212bd0d
commit
3f3971415d
@ -4,7 +4,8 @@
|
||||
|
||||
Limine scans for a config file on *the boot drive*. Every partition on the boot drive
|
||||
is scanned sequentially (first partition first, last partition last) for the presence
|
||||
of either a `/limine.cfg` or a `/boot/limine.cfg` file, in that order.
|
||||
of either a `/limine.cfg`, `/boot/limine.cfg`, `/tomatboot.cfg`, or a
|
||||
`/boot/tomatboot.cfg` file, in that order.
|
||||
|
||||
Once the file is located, Limine will use it as its config file. Other possible
|
||||
candidates in subsequent partitions or directories are ignored.
|
||||
|
BIN
limine-pxe.bin
BIN
limine-pxe.bin
Binary file not shown.
BIN
limine.bin
BIN
limine.bin
Binary file not shown.
BIN
stage2.map
BIN
stage2.map
Binary file not shown.
@ -19,11 +19,12 @@ static char *config_addr;
|
||||
int init_config_disk(struct part *part) {
|
||||
struct file_handle f;
|
||||
|
||||
if (fopen(&f, part, "/limine.cfg")) {
|
||||
if (fopen(&f, part, "/boot/limine.cfg")) {
|
||||
if (fopen(&f, part, "/limine.cfg")
|
||||
&& fopen(&f, part, "/boot/limine.cfg")
|
||||
&& fopen(&f, part, "/tomatboot.cfg")
|
||||
&& fopen(&f, part, "/boot/tomatboot.cfg")) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
size_t config_size = f.size + 1;
|
||||
config_addr = conv_mem_alloc(config_size);
|
||||
@ -35,7 +36,8 @@ int init_config_disk(struct part *part) {
|
||||
|
||||
int init_config_pxe(void) {
|
||||
struct tftp_file_handle cfg;
|
||||
if (tftp_open(&cfg, 0, 69, "limine.cfg")) {
|
||||
if (tftp_open(&cfg, 0, 69, "limine.cfg")
|
||||
&& tftp_open(&cfg, 0, 69, "tomatboot.cfg")) {
|
||||
return -1;
|
||||
}
|
||||
config_addr = conv_mem_alloc(cfg.file_size);
|
||||
|
Loading…
Reference in New Issue
Block a user