aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-06-27 07:57:21 -0700
committerH. Peter Anvin <hpa@zytor.com>2012-06-27 07:57:21 -0700
commit172261b8d33c33709019ed5635c5c6452295af17 (patch)
treeefb5068c9a9d4d41a0b89ea3676f061a14631ece /com32/modules
parenta55e0ef0c6a7831d9c5b1c855385968fa5edab22 (diff)
parentdffee2c45ad45957f791c89e9197e115f9449b40 (diff)
downloadsyslinux-172261b8d33c33709019ed5635c5c6452295af17.tar.gz
syslinux-172261b8d33c33709019ed5635c5c6452295af17.tar.xz
syslinux-172261b8d33c33709019ed5635c5c6452295af17.zip
Merge branch 'elflink' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux into elflink
Diffstat (limited to 'com32/modules')
-rw-r--r--com32/modules/Makefile15
-rw-r--r--com32/modules/gpxecmd.c5
-rw-r--r--com32/modules/host.c35
-rw-r--r--com32/modules/pxechn.c8
-rw-r--r--com32/modules/sanboot.c5
5 files changed, 28 insertions, 40 deletions
diff --git a/com32/modules/Makefile b/com32/modules/Makefile
index 017d6db0..8d94cfec 100644
--- a/com32/modules/Makefile
+++ b/com32/modules/Makefile
@@ -28,6 +28,21 @@ MODULES = config.c32 ethersel.c32 dmitest.c32 cpuidtest.c32 \
TESTFILES =
+LDFLAGS_cpuidtest.o = $(com32)/gpllib/libcom32gpl.c32
+LDFLAGS_disk.o = $(com32)/gpllib/libcom32gpl.c32
+LDFLAGS_ethersel.o = $(com32)/lib/libcom32.c32
+LDFLAGS_gpxecmd.o = $(com32)/lib/libcom32.c32
+LDFLAGS_host.o = $(com32)/lib/libcom32.c32
+LDFLAGS_ifcpu.o = $(com32)/libutil/libutil_com.c32 \
+ $(com32)/gpllib/libcom32gpl.c32
+LDFLAGS_kbdmap.o = $(com32)/lib/libcom32.c32
+LDFLAGS_linux.o = $(com32)/lib/libcom32.c32
+LDFLAGS_pxechn.o = $(com32)/lib/libcom32.c32 \
+ $(com32)/libutil/libutil_com.c32
+LDFLAGS_sanboot.o = $(com32)/lib/libcom32.c32
+LDFLAGS_vpdtest.o = $(com32)/gpllib/libcom32gpl.c32
+LDFLAGS_zzjson.o = $(com32)/gpllib/libcom32gpl.c32
+
all: $(MODULES) $(TESTFILES)
.PRECIOUS: %.o
diff --git a/com32/modules/gpxecmd.c b/com32/modules/gpxecmd.c
index fe414b9a..9d4f4561 100644
--- a/com32/modules/gpxecmd.c
+++ b/com32/modules/gpxecmd.c
@@ -43,7 +43,10 @@ static void gpxecmd(const char **args)
memset(&reg, 0, sizeof reg);
- fx = __com32.cs_bounce;
+ fx = lmalloc(sizeof *fx);
+ if (!fx)
+ return;
+
q = (char *)(fx + 1);
fx->Status = 1;
diff --git a/com32/modules/host.c b/com32/modules/host.c
index df517256..d70efffd 100644
--- a/com32/modules/host.c
+++ b/com32/modules/host.c
@@ -1,43 +1,14 @@
-/* ----------------------------------------------------------------------- *
- *
- * Copyright 2009 Liu Aleaxander <Aleaxander@gmail.com>
- * Copyright 2012 Paulo Alcantara <pcacjr@zytor.com>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall
- * be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * ----------------------------------------------------------------------- */
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <console.h>
-#include <com32.h>
-
#include <netinet/in.h>
+#include <com32.h>
#include <syslinux/pxe.h>
static inline uint32_t dns_resolve(const char *hostname)
{
- return pxe_dns_resolv(hostname);
+ return pxe_dns(hostname);
}
static inline void usage(const char *s)
@@ -54,7 +25,7 @@ int main(int argc, char *argv[])
if (argc < 2) {
usage(argv[0]);
- exit(1);
+ return 1;
}
for (i = 1; i < argc; i++) {
diff --git a/com32/modules/pxechn.c b/com32/modules/pxechn.c
index 3f9ebd32..1902d4ef 100644
--- a/com32/modules/pxechn.c
+++ b/com32/modules/pxechn.c
@@ -1031,10 +1031,7 @@ int pxe_restart(char *ifn)
}
printf(" Attempting to boot '%s'...\n\n", pxe.fn);
memset(&reg, 0, sizeof reg);
- if (sizeof(t_PXENV_TFTP_READ_FILE) <= __com32.cs_bounce_size) {
- pxep = __com32.cs_bounce;
- memset(pxep, 0, sizeof(t_PXENV_RESTART_TFTP));
- } else if (!(pxep = lzalloc(sizeof(t_PXENV_RESTART_TFTP)))){
+ if (!(pxep = lzalloc(sizeof(t_PXENV_RESTART_TFTP)))){
dprintf("Unable to lzalloc() for PXE call structure\n");
goto ret;
}
@@ -1055,8 +1052,7 @@ int pxe_restart(char *ifn)
__intcall(0x22, &reg, &reg);
printf("PXENV_RESTART_TFTP returned %d\n", pxep->Status);
- if (pxep != __com32.cs_bounce)
- lfree(pxep);
+ lfree(pxep);
ret:
return rv;
diff --git a/com32/modules/sanboot.c b/com32/modules/sanboot.c
index a2fbbd6a..d55fbc08 100644
--- a/com32/modules/sanboot.c
+++ b/com32/modules/sanboot.c
@@ -43,7 +43,10 @@ static void sanboot(const char **args)
memset(&reg, 0, sizeof reg);
- fx = __com32.cs_bounce;
+ fx = lmalloc(sizeof *fx);
+ if (!fx)
+ return;
+
q = (char *)(fx + 1);
fx->Status = 1;