From dcf5e1cc66a4d37867e891d05ee114e0cf929bcf Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 18 Feb 2009 21:11:55 -0800 Subject: [PATCH] syslinux_derivative_info(): use the buffer we already have Use the data buffer already set aside for syslinux_derivative_info(). --- com32/include/syslinux/config.h | 2 +- com32/lib/syslinux/dsinfo.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/com32/include/syslinux/config.h b/com32/include/syslinux/config.h index b5ed04c..ed4bf24 100644 --- a/com32/include/syslinux/config.h +++ b/com32/include/syslinux/config.h @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 2007-2008 H. Peter Anvin - All Rights Reserved + * Copyright 2007-2009 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/com32/lib/syslinux/dsinfo.c b/com32/lib/syslinux/dsinfo.c index eebbbd3..b3d3b3c 100644 --- a/com32/lib/syslinux/dsinfo.c +++ b/com32/lib/syslinux/dsinfo.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 2008 H. Peter Anvin - All Rights Reserved + * Copyright 2008-2009 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -33,11 +33,10 @@ union syslinux_derivative_info __syslinux_derivative_info; void __constructor __syslinux_get_derivative_info(void) { - static com32sys_t reg; com32sys_t * const r = &__syslinux_derivative_info.rr.r; - reg.eax.w[0] = 0x000A; - __intcall(0x22, ®, r); + r->eax.w[0] = 0x000A; + __intcall(0x22, r, r); __syslinux_derivative_info.r.esbx = MK_PTR(r->es, r->ebx.w[0]); __syslinux_derivative_info.r.fssi = MK_PTR(r->fs, r->esi.w[0]); -- 2.7.4