summaryrefslogtreecommitdiff
path: root/com32/gfxboot/gfxboot.c
diff options
context:
space:
mode:
authorSebastian Herbszt <herbszt@gmx.de>2010-05-30 22:18:14 +0200
committerSebastian Herbszt <herbszt@gmx.de>2010-05-30 22:18:14 +0200
commit289305bafc4a616f48d3b94e1c1d72502ad45aab (patch)
treee4fb8a785ac23f718e769079ac3d823ee1a56738 /com32/gfxboot/gfxboot.c
parent08b3602db548775ca819780de77686a186156ec7 (diff)
downloadsyslinux-289305bafc4a616f48d3b94e1c1d72502ad45aab.tar.gz
gfxboot: use syslinux_derivative_info()
Use syslinux_derivative_info() instead of open coding it. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Diffstat (limited to 'com32/gfxboot/gfxboot.c')
-rw-r--r--com32/gfxboot/gfxboot.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c
index a6c95fe1..b3ee6769 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;
}