aboutsummaryrefslogtreecommitdiffstats
path: root/com32/sysdump/vesa.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-06-18 18:27:55 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-06-18 18:27:55 -0700
commit46971666d3fbe15db020029034747a64738754aa (patch)
treeb77c7c7c3229966a8fe3255697fa98e84c9f82e0 /com32/sysdump/vesa.c
parent618d11938982a04070ded7291a9f12c3b0452d1d (diff)
downloadsyslinux-46971666d3fbe15db020029034747a64738754aa.tar.gz
syslinux-46971666d3fbe15db020029034747a64738754aa.tar.xz
syslinux-46971666d3fbe15db020029034747a64738754aa.zip
sysdump: use lmalloc/lfree
Use lmalloc/lfree instead of using the fixed (obsolete) bounce buffer. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'com32/sysdump/vesa.c')
-rw-r--r--com32/sysdump/vesa.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/com32/sysdump/vesa.c b/com32/sysdump/vesa.c
index 9bdc7153..017f9e4f 100644
--- a/com32/sysdump/vesa.c
+++ b/com32/sysdump/vesa.c
@@ -7,6 +7,7 @@
void dump_vesa_tables(struct backend *be)
{
com32sys_t rm;
+ struct vesa_info *vip;
struct vesa_general_info *gip, gi;
struct vesa_mode_info *mip, mi;
uint16_t mode, *mode_ptr;
@@ -15,8 +16,9 @@ void dump_vesa_tables(struct backend *be)
printf("Scanning VESA BIOS... ");
/* Allocate space in the bounce buffer for these structures */
- gip = &((struct vesa_info *)__com32.cs_bounce)->gi;
- mip = &((struct vesa_info *)__com32.cs_bounce)->mi;
+ vip = lmalloc(sizeof *vip);
+ gip = &vip->gi;
+ mip = &vip->mi;
memset(&rm, 0, sizeof rm);
memset(gip, 0, sizeof *gip);
@@ -56,5 +58,6 @@ void dump_vesa_tables(struct backend *be)
cpio_writefile(be, modefile, &mi, sizeof mi);
}
+ lfree(vip);
printf("done.\n");
}