struct disk *(*disk_init)(struct disk_private *);
struct output_ops *o_ops;
struct input_ops *i_ops;
+ char *(*get_config_file_name)(void);
};
extern struct firmware *firmware;
.getchar = bios_getchar,
};
+extern char *bios_get_config_file_name(void);
+
struct firmware bios_fw = {
.init = bios_init,
.scan_memory = bios_scan_memory,
.disk_init = bios_disk_init,
.o_ops = &bios_output_ops,
.i_ops = &bios_input_ops,
+ .get_config_file_name = bios_get_config_file_name,
};
void syslinux_register_bios(void)
*
* ----------------------------------------------------------------------- */
+#include <syslinux/firmware.h>
#include <syslinux/config.h>
#include <klibc/compiler.h>
#include <com32.h>
const char *__syslinux_config_file;
-void __constructor __syslinux_get_config_file_name(void)
+char *bios_get_config_file_name(void)
{
static com32sys_t reg;
reg.eax.w[0] = 0x000e;
__intcall(0x22, ®, ®);
- __syslinux_config_file = MK_PTR(reg.es, reg.ebx.w[0]);
+ return MK_PTR(reg.es, reg.ebx.w[0]);
+}
+
+void __constructor __syslinux_get_config_file_name(void)
+{
+ __syslinux_config_file = firmware->get_config_file_name();
}
.getchar = efi_getchar,
};
+char *efi_get_config_file_name(void)
+{
+ return ConfigName;
+}
+
extern struct disk *efi_disk_init(com32sys_t *);
struct firmware efi_fw = {
.init = efi_init,
.disk_init = efi_disk_init,
.o_ops = &efi_ops,
.i_ops = &efi_iops,
+ .get_config_file_name = efi_get_config_file_name,
};
static inline void syslinux_register_efi(void)