summaryrefslogtreecommitdiffstats
path: root/isys/isys.c
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-09-20 03:31:26 +0000
committerJeremy Katz <katzj@redhat.com>2003-09-20 03:31:26 +0000
commit31f1add4879da48efb7af21fc5c575692cc3709d (patch)
tree7a541b8f54f91ed8309da17752e205b40db2cf30 /isys/isys.c
parent8307d33391423f13c1deed409b80d8e381582a93 (diff)
downloadanaconda-31f1add4879da48efb7af21fc5c575692cc3709d.tar.gz
anaconda-31f1add4879da48efb7af21fc5c575692cc3709d.tar.xz
anaconda-31f1add4879da48efb7af21fc5c575692cc3709d.zip
merge from taroon
fairly large merge, but all fairly obvious stuff. will test in a tree tomorrow
Diffstat (limited to 'isys/isys.c')
-rw-r--r--isys/isys.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/isys/isys.c b/isys/isys.c
index 1da28d90d..234115fb1 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -107,6 +107,7 @@ static PyObject * py_getDasdPorts(PyObject * s, PyObject * args);
static PyObject * py_isUsableDasd(PyObject * s, PyObject * args);
static PyObject * py_isLdlDasd(PyObject * s, PyObject * args);
static PyObject * doGetMacAddress(PyObject * s, PyObject * args);
+static PyObject * doGetIPAddress(PyObject * s, PyObject * args);
static PyMethodDef isysModuleMethods[] = {
{ "ejectcdrom", (PyCFunction) doEjectCdrom, METH_VARARGS, NULL },
@@ -161,6 +162,7 @@ static PyMethodDef isysModuleMethods[] = {
{ "isUsableDasd", (PyCFunction) py_isUsableDasd, METH_VARARGS, NULL},
{ "isLdlDasd", (PyCFunction) py_isLdlDasd, METH_VARARGS, NULL},
{ "getMacAddress", (PyCFunction) doGetMacAddress, METH_VARARGS, NULL},
+ { "getIPAddress", (PyCFunction) doGetIPAddress, METH_VARARGS, NULL},
{ NULL }
} ;
@@ -1398,6 +1400,18 @@ static PyObject * doGetMacAddress(PyObject * s, PyObject * args) {
return Py_BuildValue("s", ret);
}
+static PyObject * doGetIPAddress(PyObject * s, PyObject * args) {
+ char *dev;
+ char *ret;
+
+ if (!PyArg_ParseTuple(args, "s", &dev))
+ return NULL;
+
+ ret = getIPAddr(dev);
+
+ return Py_BuildValue("s", ret);
+}
+
static PyObject * py_getDasdPorts(PyObject * o, PyObject * args) {
if (!PyArg_ParseTuple(args, "")) return NULL;