From 289305bafc4a616f48d3b94e1c1d72502ad45aab Mon Sep 17 00:00:00 2001 From: Sebastian Herbszt Date: Sun, 30 May 2010 22:18:14 +0200 Subject: [PATCH] gfxboot: use syslinux_derivative_info() Use syslinux_derivative_info() instead of open coding it. Signed-off-by: Sebastian Herbszt --- com32/gfxboot/gfxboot.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c index a6c95fe..b3ee676 100644 --- a/com32/gfxboot/gfxboot.c +++ b/com32/gfxboot/gfxboot.c @@ -182,23 +182,19 @@ void boot_entry(menu_t *menu_ptr, char *arg); int main(int argc, char **argv) { int menu_index; - enum syslinux_filesystem syslinux_id; - com32sys_t r; + const union syslinux_derivative_info *sdi; openconsole(&dev_stdcon_r, &dev_stdcon_w); - syslinux_id = syslinux_version()->filesystem; - lowmem_buf = __com32.cs_bounce; lowmem_buf_size = __com32.cs_bounce_size; - r.eax.l = 0x0a; // Get Derivative-Specific Information - r.ecx.l = 9; - __intcall(0x22, &r, &r); - gfx_config.sector_shift = (uint8_t) r.ecx.l; - gfx_config.boot_drive = (uint8_t) r.edx.l; + sdi = syslinux_derivative_info(); + + gfx_config.sector_shift = sdi->disk.sector_shift; + gfx_config.boot_drive = sdi->disk.drive_number; - if(syslinux_id == SYSLINUX_FS_PXELINUX) { + if(sdi->c.filesystem == SYSLINUX_FS_PXELINUX) { gfx_config.sector_shift = 11; gfx_config.boot_drive = 0; } -- 2.7.4