diff options
Diffstat (limited to 'loader2')
-rw-r--r-- | loader2/Makefile | 5 | ||||
-rw-r--r-- | loader2/net.c | 14 | ||||
-rw-r--r-- | loader2/urlinstall.c | 4 |
3 files changed, 13 insertions, 10 deletions
diff --git a/loader2/Makefile b/loader2/Makefile index 5528c4abe..efb951c15 100644 --- a/loader2/Makefile +++ b/loader2/Makefile @@ -7,6 +7,9 @@ else TARGET=depend $(PROGS) endif +GLIB = /lib/libglib-2.0.a +CFLAGS += $(shell pkg-config --cflags glib-2.0) + SLANGLIB = -lslang NEWTLIB = -lnewt ISYSLIB = ../isys/libisys.a @@ -118,7 +121,7 @@ loader-net.o: loader.c loader: loader.o $(OBJS) $(NETOBJS) $(CC) -g $(STATIC) -o $@ $^ -lpopt \ $(HWLIBS) $(ISYSLIB) $(GUNZIP) $(UNICODELIB) \ - -lpump -lresolv $(NEWTLIB) $(SLANGLIB) $(DMLIB) + -lpump -lresolv $(NEWTLIB) $(SLANGLIB) $(DMLIB) $(GLIB) clean: rm -f *.o *~ .depend init ctype.c mkctype \ diff --git a/loader2/net.c b/loader2/net.c index 9d668b908..fc0d0ba68 100644 --- a/loader2/net.c +++ b/loader2/net.c @@ -37,7 +37,7 @@ #include "../isys/isys.h" #include "../isys/net.h" #include "../isys/wireless.h" -#include "../isys/getmacaddr.h" +#include "../isys/nl.h" #include "lang.h" #include "loader.h" @@ -1017,11 +1017,11 @@ int chooseNetworkInterface(struct loaderData_s * loaderData, devices = alloca((i + 1) * sizeof(*devices)); deviceNames = alloca((i + 1) * sizeof(*devices)); if (loaderData->netDev && (loaderData->netDev_set) == 1) { - if ((loaderData->bootIf && (loaderData->bootIf_set) == 1) && - !strcasecmp(loaderData->netDev, "bootif")) - ksMacAddr = sanitizeMacAddr(loaderData->bootIf); - else - ksMacAddr = sanitizeMacAddr(loaderData->netDev); + if ((loaderData->bootIf && (loaderData->bootIf_set) == 1) && !strcasecmp(loaderData->netDev, "bootif")) { + ksMacAddr = netlink_format_mac_addr(ksMacAddr, (unsigned char *) loaderData->bootIf); + } else { + ksMacAddr = netlink_format_mac_addr(ksMacAddr, (unsigned char *) loaderData->netDev); + } } for (i = 0; devs[i]; i++) { @@ -1048,7 +1048,7 @@ int chooseNetworkInterface(struct loaderData_s * loaderData, } else if (ksMacAddr != NULL) { /* maybe it's a mac address */ char * devmacaddr; - devmacaddr = sanitizeMacAddr(getMacAddr(devs[i]->device)); + devmacaddr = netlink_interfaces_mac2str(devs[i]->device); if ((devmacaddr != NULL) && !strcmp(ksMacAddr, devmacaddr)) { foundDev = 1; free(loaderData->netDev); diff --git a/loader2/urlinstall.c b/loader2/urlinstall.c index 77be23941..d35460391 100644 --- a/loader2/urlinstall.c +++ b/loader2/urlinstall.c @@ -23,7 +23,7 @@ #include <sys/mount.h> #include <unistd.h> -#include "../isys/getmacaddr.h" +#include "../isys/nl.h" #include "kickstart.h" #include "loader.h" @@ -388,7 +388,7 @@ int getFileFromUrl(char * url, char * dest, devices = probeDevices(CLASS_NETWORK, BUS_UNSPEC, PROBE_LOADED); for (i = 0; devices && devices[i]; i++) { dev = devices[i]->device; - mac = getMacAddr(dev); + mac = netlink_interfaces_mac2str(dev); if (mac) { snprintf(tmpstr, sizeof(tmpstr), "X-RHN-Provisioning-MAC-%d: %s %s\r\n", i, dev, mac); |