summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2006-09-12 17:26:22 +0000
committerJeremy Katz <katzj@redhat.com>2006-09-12 17:26:22 +0000
commit3d4bfbf611ca08d9286b376de2939a50b13cfb0d (patch)
treedaac2a000e03752e2391312341688fcd1f97434f /isys
parent175ba6d958dba319f821741ad0deb378967c6daa (diff)
downloadanaconda-3d4bfbf611ca08d9286b376de2939a50b13cfb0d.tar.gz
anaconda-3d4bfbf611ca08d9286b376de2939a50b13cfb0d.tar.xz
anaconda-3d4bfbf611ca08d9286b376de2939a50b13cfb0d.zip
* isys/isys.c (doDhcpNetDevice): Rename to be dhcp instead of
pump. Prefer DHCPv4 for now * isys/isys.py (dhcpNetDevice): Rename pumpNetDevice to this, leave pumpNetDevice stub * isys/Makefile (nltest): Fix build of test program
Diffstat (limited to 'isys')
-rw-r--r--isys/Makefile2
-rw-r--r--isys/isys.c12
-rw-r--r--isys/isys.py10
3 files changed, 14 insertions, 10 deletions
diff --git a/isys/Makefile b/isys/Makefile
index 5b707f7c8..f38df497d 100644
--- a/isys/Makefile
+++ b/isys/Makefile
@@ -84,7 +84,7 @@ nfs_mountversion.h: /usr/include/linux/nfs_mount.h
nltest: nl.c nl.h
$(CC) -c $(CFLAGS) -DTESTING nl.c -o nl.o
- $(CC) -DTESTING nl.o -o nl $(LOADLIBES)
+ $(CC) -DTESTING nl.o -o nl $(LOADLIBES) str.o
depend: nfs_mountversion.h
$(CPP) -M $(CFLAGS) $(SOURCES) > .depend
diff --git a/isys/isys.c b/isys/isys.c
index 521e053d2..04cbd9fb4 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -88,7 +88,7 @@ static PyObject * doDevSpaceFree(PyObject * s, PyObject * args);
static PyObject * doRaidStart(PyObject * s, PyObject * args);
static PyObject * doRaidStop(PyObject * s, PyObject * args);
static PyObject * doConfigNetDevice(PyObject * s, PyObject * args);
-static PyObject * doPumpNetDevice(PyObject * s, PyObject * args);
+static PyObject * doDhcpNetDevice(PyObject * s, PyObject * args);
static PyObject * doResetResolv(PyObject * s, PyObject * args);
static PyObject * doSetResolvRetry(PyObject * s, PyObject * args);
static PyObject * doLoadFont(PyObject * s, PyObject * args);
@@ -144,7 +144,7 @@ static PyMethodDef isysModuleMethods[] = {
{ "htavailable", (PyCFunction) htAvailable, METH_VARARGS, NULL },
{ "umount", (PyCFunction) doUMount, METH_VARARGS, NULL },
{ "confignetdevice", (PyCFunction) doConfigNetDevice, METH_VARARGS, NULL },
- { "pumpnetdevice", (PyCFunction) doPumpNetDevice, METH_VARARGS, NULL },
+ { "dhcpnetdevice", (PyCFunction) doDhcpNetDevice, METH_VARARGS, NULL },
{ "checkBoot", (PyCFunction) doCheckBoot, METH_VARARGS, NULL },
{ "swapon", (PyCFunction) doSwapon, METH_VARARGS, NULL },
{ "swapoff", (PyCFunction) doSwapoff, METH_VARARGS, NULL },
@@ -610,14 +610,14 @@ static PyObject * doConfigNetDevice(PyObject * s, PyObject * args) {
}
/* FIXME: add IPv6 support once the UI changes are made --dcantrell */
-static PyObject * doPumpNetDevice(PyObject * s, PyObject * args) {
+static PyObject * doDhcpNetDevice(PyObject * s, PyObject * args) {
char * device;
char * dhcpclass = NULL;
char * r;
char buf[47];
time_t timeout = 45;
struct pumpNetIntf cfg;
- DHCP_Preference pref = 0;
+ DHCP_Preference pref = DHCPv6_DISABLE;
ip_addr_t *tip;
PyObject * rc;
@@ -1196,8 +1196,8 @@ static PyObject * isWireless(PyObject * s, PyObject * args) {
}
static PyObject * doGetIPAddress(PyObject * s, PyObject * args) {
- char *dev;
- char *ret;
+ char *dev = NULL;
+ char *ret = NULL;
if (!PyArg_ParseTuple(args, "s", &dev))
return NULL;
diff --git a/isys/isys.py b/isys/isys.py
index 2e339719d..e62713ad0 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -544,13 +544,17 @@ def resetResolv():
def setResolvRetry(count):
return _isys.setresretry(count)
-def pumpNetDevice(device, klass = None):
+def dhcpNetDevice(device, klass = None):
# returns None on failure, "" if no nameserver is found, nameserver IP
# otherwise
if klass is not None:
- return _isys.pumpnetdevice(device, klass)
+ return _isys.dhcpnetdevice(device, klass)
else:
- return _isys.pumpnetdevice(device)
+ return _isys.dhcpnetdevice(device)
+
+def pumpNetDevice(device, klass = None):
+ return dhcpNetDevice(device, klass)
+
def readXFSLabel_int(device):
try: