summaryrefslogtreecommitdiffstats
path: root/isys/isys.c
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-06-16 20:48:11 +0000
committerJeremy Katz <katzj@redhat.com>2004-06-16 20:48:11 +0000
commit0242b3634941ea767dac501e1ef9416d19faf686 (patch)
treed570986bd045999d996b74da4a89b29d2c584b97 /isys/isys.c
parent8e00115e4bd6e40995d66edb89d5a1bb906a9db1 (diff)
downloadanaconda-0242b3634941ea767dac501e1ef9416d19faf686.tar.gz
anaconda-0242b3634941ea767dac501e1ef9416d19faf686.tar.xz
anaconda-0242b3634941ea767dac501e1ef9416d19faf686.zip
bind is_wireless_interface
Diffstat (limited to 'isys/isys.c')
-rw-r--r--isys/isys.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/isys/isys.c b/isys/isys.c
index 165ac9368..d16538871 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -48,6 +48,7 @@
#include "smp.h"
#include "lang.h"
#include "getmacaddr.h"
+#include "wireless.h"
#ifndef CDROMEJECT
#define CDROMEJECT 0x5309
@@ -109,6 +110,7 @@ static PyObject * py_isLdlDasd(PyObject * s, PyObject * args);
static PyObject * doGetMacAddress(PyObject * s, PyObject * args);
static PyObject * doGetIPAddress(PyObject * s, PyObject * args);
static PyObject * doResetFileContext(PyObject * s, PyObject * args);
+static PyObject * isWireless(PyObject * s, PyObject * args);
static PyMethodDef isysModuleMethods[] = {
{ "ejectcdrom", (PyCFunction) doEjectCdrom, METH_VARARGS, NULL },
@@ -165,6 +167,7 @@ static PyMethodDef isysModuleMethods[] = {
{ "getMacAddress", (PyCFunction) doGetMacAddress, METH_VARARGS, NULL},
{ "getIPAddress", (PyCFunction) doGetIPAddress, METH_VARARGS, NULL},
{ "resetFileContext", (PyCFunction) doResetFileContext, METH_VARARGS, NULL },
+ { "isWireless", (PyCFunction) isWireless, METH_VARARGS, NULL },
{ NULL }
} ;
@@ -1280,6 +1283,18 @@ static PyObject * doGetMacAddress(PyObject * s, PyObject * args) {
return Py_BuildValue("s", ret);
}
+static PyObject * isWireless(PyObject * s, PyObject * args) {
+ char *dev;
+ int ret;
+
+ if (!PyArg_ParseTuple(args, "s", &dev))
+ return NULL;
+
+ ret = is_wireless_interface(dev);
+
+ return Py_BuildValue("i", ret);
+}
+
static PyObject * doGetIPAddress(PyObject * s, PyObject * args) {
char *dev;
char *ret;