[syslinux:pathbased] gfxboot: use syslinux_derivative_info()
syslinux-bot for Sebastian Herbszt
herbszt at gmx.de
Sun Jun 13 15:57:09 PDT 2010
Commit-ID: 289305bafc4a616f48d3b94e1c1d72502ad45aab
Gitweb: http://syslinux.zytor.com/commit/289305bafc4a616f48d3b94e1c1d72502ad45aab
Author: Sebastian Herbszt <herbszt at gmx.de>
AuthorDate: Sun, 30 May 2010 22:18:14 +0200
Committer: Sebastian Herbszt <herbszt at gmx.de>
CommitDate: Sun, 30 May 2010 22:18:14 +0200
gfxboot: use syslinux_derivative_info()
Use syslinux_derivative_info() instead of open coding it.
Signed-off-by: Sebastian Herbszt <herbszt at gmx.de>
---
com32/gfxboot/gfxboot.c | 16 ++++++----------
1 files 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;
}
More information about the Syslinux-commits
mailing list