diff options
author | Paulo Alcantara <pcacjr@zytor.com> | 2012-05-04 03:58:52 -0300 |
---|---|---|
committer | Paulo Alcantara <pcacjr@zytor.com> | 2012-05-12 00:56:22 -0300 |
commit | 9a9334b4260328bce705c610e3a0bc92c71bdd60 (patch) | |
tree | 46c23620e6c1463d9460e2bad940ac3b359e97cf | |
parent | 6aba981cd9310bae94587d3e51106261bf0e27b9 (diff) | |
download | syslinux-9a9334b4260328bce705c610e3a0bc92c71bdd60.tar.gz syslinux-9a9334b4260328bce705c610e3a0bc92c71bdd60.tar.xz syslinux-9a9334b4260328bce705c610e3a0bc92c71bdd60.zip |
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@zytor.com>
-rw-r--r-- | com32/lib/sys/gpxe.c | 7 | ||||
-rw-r--r-- | com32/modules/gpxecmd.c | 4 | ||||
-rw-r--r-- | 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 d86da42a..06c45106 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 9ae1b601..fe414b9a 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 01265dea..a2fbbd6a 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); |