[syslinux:elflink] com32: Do not use hard-coded values for PXE flags
syslinux-bot for Paulo Alcantara
pcacjr at zytor.com
Wed May 16 14:21:07 PDT 2012
Commit-ID: 9a9334b4260328bce705c610e3a0bc92c71bdd60
Gitweb: http://www.syslinux.org/commit/9a9334b4260328bce705c610e3a0bc92c71bdd60
Author: Paulo Alcantara <pcacjr at zytor.com>
AuthorDate: Fri, 4 May 2012 03:58:52 -0300
Committer: Paulo Alcantara <pcacjr at zytor.com>
CommitDate: Sat, 12 May 2012 00:56:22 -0300
com32: Do not use hard-coded values for PXE flags
There is already a syslinux/pxe_api.h header file which contains PXE
flags, so these hard-coded values are unnecessaries.
Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>
---
com32/lib/sys/gpxe.c | 7 +++++--
com32/modules/gpxecmd.c | 4 +++-
com32/modules/sanboot.c | 4 +++-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/com32/lib/sys/gpxe.c b/com32/lib/sys/gpxe.c
index d86da42..06c4510 100644
--- a/com32/lib/sys/gpxe.c
+++ b/com32/lib/sys/gpxe.c
@@ -1,6 +1,8 @@
+#include <string.h>
+
#include <sys/gpxe.h>
#include <syslinux/config.h>
-#include <string.h>
+#include <syslinux/pxe_api.h>
bool is_gpxe(void)
{
@@ -16,12 +18,13 @@ bool is_gpxe(void)
fca = lzalloc(sizeof *fca);
if (!fca)
return false;
+
fca->Size = sizeof *fca;
fca->Magic = 0x91d447b2;
memset(®, 0, sizeof reg);
reg.eax.w[0] = 0x0009;
- reg.ebx.w[0] = 0x00e6; /* PXENV_FILE_API_CHECK */
+ reg.ebx.w[0] = PXENV_FILE_API_CHECK;
/* reg.edi.w[0] = OFFS(fca); */
reg.es = SEG(fca);
diff --git a/com32/modules/gpxecmd.c b/com32/modules/gpxecmd.c
index 9ae1b60..fe414b9 100644
--- a/com32/modules/gpxecmd.c
+++ b/com32/modules/gpxecmd.c
@@ -22,7 +22,9 @@
#include <console.h>
#include <com32.h>
#include <string.h>
+
#include <sys/gpxe.h>
+#include <syslinux/pxe_api.h>
struct segoff16 {
uint16_t offs, seg;
@@ -57,7 +59,7 @@ static void gpxecmd(const char **args)
memset(®, 0, sizeof reg);
reg.eax.w[0] = 0x0009;
- reg.ebx.w[0] = 0x00e5; /* PXENV_FILE_EXEC */
+ reg.ebx.w[0] = PXENV_FILE_EXEC;
reg.edi.w[0] = OFFS(fx);
reg.es = SEG(fx);
diff --git a/com32/modules/sanboot.c b/com32/modules/sanboot.c
index 01265de..a2fbbd6 100644
--- a/com32/modules/sanboot.c
+++ b/com32/modules/sanboot.c
@@ -22,7 +22,9 @@
#include <console.h>
#include <com32.h>
#include <string.h>
+
#include <sys/gpxe.h>
+#include <syslinux/pxe_api.h>
struct segoff16 {
uint16_t offs, seg;
@@ -58,7 +60,7 @@ static void sanboot(const char **args)
memset(®, 0, sizeof reg);
reg.eax.w[0] = 0x0009;
- reg.ebx.w[0] = 0x00e5; /* PXENV_FILE_EXEC */
+ reg.ebx.w[0] = PXENV_FILE_EXEC;
reg.edi.w[0] = OFFS(fx);
reg.es = SEG(fx);
More information about the Syslinux-commits
mailing list