diff options
author | Erik Troan <ewt@redhat.com> | 1999-08-07 19:25:20 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-08-07 19:25:20 +0000 |
commit | 413cf4439566642c7c3811db5a94dd8e6ef2b2c2 (patch) | |
tree | 35d21a4eb1eb60ce3cebf7d4d867c2969789060e /isys/isys.c | |
parent | 7963950fccc64cb4e50505a967df0b05f7f2950a (diff) | |
download | anaconda-413cf4439566642c7c3811db5a94dd8e6ef2b2c2.tar.gz anaconda-413cf4439566642c7c3811db5a94dd8e6ef2b2c2.tar.xz anaconda-413cf4439566642c7c3811db5a94dd8e6ef2b2c2.zip |
updated to use pump for net configuration
Diffstat (limited to 'isys/isys.c')
-rw-r--r-- | isys/isys.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/isys/isys.c b/isys/isys.c index e9bdd33cc..7cce1b406 100644 --- a/isys/isys.c +++ b/isys/isys.c @@ -7,7 +7,7 @@ #include "Python.h" #include "imount.h" -#include "inet.h" +#include "../pump/pump.h" #include "isys.h" #include "pci/pciprobe.h" #include "probe.h" @@ -341,7 +341,7 @@ static void emptyDestructor(PyObject * s) { static PyObject * doConfigNetDevice(PyObject * s, PyObject * args) { char * dev, * ip, * netmask, * broadcast, * network; int * isPtp, rc; - struct intfInfo device; + struct pumpNetIntf device; if (!PyArg_ParseTuple(args, "sssssd", &dev, &ip, &netmask, &broadcast, &network, &isPtp)) return NULL; @@ -351,15 +351,13 @@ static PyObject * doConfigNetDevice(PyObject * s, PyObject * args) { device.netmask.s_addr = inet_addr(netmask); device.broadcast.s_addr = inet_addr(broadcast); device.network.s_addr = inet_addr(network); - device.isPtp = 0; - device.isUp = 0; + device.set = PUMP_INTFINFO_HAS_IP | PUMP_INTFINFO_HAS_NETMASK | + PUMP_INTFINFO_HAS_BROADCAST | PUMP_INTFINFO_HAS_NETWORK; - rc = configureNetDevice(&device); - - if (rc == INET_ERR_ERRNO) + if (pumpSetupInterface(&device)) { PyErr_SetFromErrno(PyExc_SystemError); - else if (rc) - PyErr_SetString(PyExc_SystemError, "net configure failed"); + return NULL; + } Py_INCREF(Py_None); return Py_None; |