diff options
author | Erik Troan <ewt@redhat.com> | 1999-08-07 19:34:22 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-08-07 19:34:22 +0000 |
commit | cb113c584477770cf8e1e8485144ec8e3a92c3b1 (patch) | |
tree | 1cd890e7f83865dc9a8bec1b4d53d5088c6ff930 /loader | |
parent | 4e3043fdf4ddb393b042e25ec22153d285dd7037 (diff) | |
download | anaconda-cb113c584477770cf8e1e8485144ec8e3a92c3b1.tar.gz anaconda-cb113c584477770cf8e1e8485144ec8e3a92c3b1.tar.xz anaconda-cb113c584477770cf8e1e8485144ec8e3a92c3b1.zip |
switched to use pump networking code
Diffstat (limited to 'loader')
-rw-r--r-- | loader/Makefile | 2 | ||||
-rw-r--r-- | loader/loader.c | 16 |
2 files changed, 11 insertions, 7 deletions
diff --git a/loader/Makefile b/loader/Makefile index 2ebb744f3..67b52c4a4 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -46,7 +46,7 @@ loader: $(OBJS) ../isys/modutils/insmod/libmodutils.a \ ../isys/modutils/util/libutil.a \ ../isys/modutils/obj/libobj.a \ - -lrpm -lz -lresolv -lnewt -lslang -lpci + -L../pump -lpump -lrpm -lz -lresolv -lnewt -lslang -lpci devices: devices.o modules.o $(CC) -g -o $@ devices.o modules.o -lpopt \ diff --git a/loader/loader.c b/loader/loader.c index 0a6b4d67a..46218e2ce 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -35,7 +35,7 @@ #include <unistd.h> #include "isys/imount.h" -#include "isys/inet.h" +#include "pump/pump.h" #include "isys/isys.h" #include "isys/probe.h" #include "isys/pci/pciprobe.h" @@ -207,7 +207,7 @@ static int nfsGetSetup(char ** hostptr, char ** dirptr) { return 0; } -int readNetConfig(char * device, struct intfInfo * dev) { +int readNetConfig(char * device, struct pumpNetIntf * dev) { newtComponent text, f, okay, back, answer; newtGrid grid, subgrid, buttons; struct intfconfig_s c; @@ -279,11 +279,13 @@ int readNetConfig(char * device, struct intfInfo * dev) { if (*c.ip && inet_aton(c.ip, &addr)) { i++; dev->ip = addr; + dev->set |= PUMP_INTFINFO_HAS_IP; } if (*c.nm && inet_aton(c.nm, &addr)) { i++; dev->netmask = addr; + dev->set |= PUMP_INTFINFO_HAS_NETMASK; } if (i != 2) { @@ -296,17 +298,19 @@ int readNetConfig(char * device, struct intfInfo * dev) { *((int32 *) &dev->broadcast) = (*((int32 *) &dev->ip) & *((int32 *) &dev->netmask)) | ~(*((int32 *) &dev->netmask)); + dev->set |= PUMP_INTFINFO_HAS_BROADCAST; *((int32 *) &dev->network) = *((int32 *) &dev->ip) & *((int32 *) &dev->netmask); + dev->set |= PUMP_INTFINFO_HAS_NETWORK; if (*c.gw && inet_aton(c.gw, &addr)) { dev->gateway = addr; + dev->set = PUMP_NETINFO_HAS_GATEWAY; } strcpy(dev->device, device); - dev->isPtp = dev->isUp = 0; newtPopWindow(); @@ -481,7 +485,7 @@ static int ensureNetDevice(struct knownDevices * kd, static int mountNfsImage(char * location, struct knownDevices * kd, moduleInfoSet modInfo, moduleList modLoaded, moduleDeps modDeps, int flags) { - struct intfInfo netDev; + struct pumpNetIntf netDev; char * devName; int i; char * host = NULL; @@ -495,8 +499,8 @@ static int mountNfsImage(char * location, struct knownDevices * kd, nfsGetSetup(&host, &dir); if (!FL_TESTING(flags)) { - configureNetDevice(&netDev); - addDefaultRoute(&netDev); + pumpSetupInterface(&netDev); + pumpSetupDefaultGateway(&netDev.gateway); mlLoadModule("nfs", modLoaded, modDeps, flags); |