aboutsummaryrefslogtreecommitdiffstats
path: root/com32/samples
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-07-12 13:34:06 +0100
committerMatt Fleming <matt.fleming@intel.com>2012-07-20 10:20:19 +0100
commitf0bbf9dd40f37f8c4870a33784996efd56955a75 (patch)
tree2a50425df977a28bee4304437daf008a93893624 /com32/samples
parent8486142cf30499e1d53d7faf3a168c8ed3163ab2 (diff)
downloadsyslinux-f0bbf9dd40f37f8c4870a33784996efd56955a75.tar.gz
syslinux-f0bbf9dd40f37f8c4870a33784996efd56955a75.tar.xz
syslinux-f0bbf9dd40f37f8c4870a33784996efd56955a75.zip
Use pxe_call() instead of COMBOOT API
This involved some other changes, such as passing flags to unload_pxe() now that we only call it from C code, and hence don't need to update KeepPXE. We also needed to move some of the pxe function prototypes to com32/include/syslinux/pxe_api.h because they are now referenced outside of the core. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/samples')
-rw-r--r--com32/samples/resolv.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/com32/samples/resolv.c b/com32/samples/resolv.c
index bd49d9f9..f4a0e52a 100644
--- a/com32/samples/resolv.c
+++ b/com32/samples/resolv.c
@@ -16,6 +16,7 @@
* Resolve an IP address
*/
+#include <syslinux/pxe_api.h>
#include <string.h>
#include <stdio.h>
#include <console.h>
@@ -24,21 +25,7 @@
uint32_t resolv(const char *name)
{
- com32sys_t reg;
-
- strcpy((char *)__com32.cs_bounce, name);
-
- memset(&reg, 0, sizeof reg);
- reg.eax.w[0] = 0x0010;
- reg.ebx.w[0] = OFFS(__com32.cs_bounce);
- reg.es = SEG(__com32.cs_bounce);
-
- __intcall(0x22, &reg, &reg);
-
- if (reg.eflags.l & EFLAGS_CF)
- return 0;
- else
- return reg.eax.l;
+ return dns_resolv(name);
}
int main(int argc, char *argv[])