summaryrefslogtreecommitdiffstats
path: root/isys/isys.c
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-08-09 18:01:12 +0000
committerMatt Wilson <msw@redhat.com>1999-08-09 18:01:12 +0000
commita14ffd86b426ad1cd9b1514face96339a8a9395b (patch)
treea3987594de24bade5806488e7f5c0ec4fa0475bf /isys/isys.c
parent5f8472d54d8c1f47fd85b994f5bb89b7c6aa1ab1 (diff)
downloadanaconda-a14ffd86b426ad1cd9b1514face96339a8a9395b.tar.gz
anaconda-a14ffd86b426ad1cd9b1514face96339a8a9395b.tar.xz
anaconda-a14ffd86b426ad1cd9b1514face96339a8a9395b.zip
authconfig almost done.
Diffstat (limited to 'isys/isys.c')
-rw-r--r--isys/isys.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/isys/isys.c b/isys/isys.c
index 73454f55b..4fe42d873 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -29,6 +29,7 @@ static PyObject * smpAvailable(PyObject * s, PyObject * args);
static PyObject * doConfigNetDevice(PyObject * s, PyObject * args);
#endif
static PyObject * createProbedList(PyObject * s, PyObject * args);
+static PyObject * doChroot(PyObject * s, PyObject * args);
static PyMethodDef isysModuleMethods[] = {
{ "findmoduleinfo", (PyCFunction) doFindModInfo, METH_VARARGS, NULL },
@@ -45,6 +46,7 @@ static PyMethodDef isysModuleMethods[] = {
#if 0
{ "confignetdevice", (PyCFunction) doConfigNetDevice, METH_VARARGS, NULL },
#endif
+ { "chroot", (PyCFunction) doChroot, METH_VARARGS, NULL },
{ NULL }
} ;
@@ -69,13 +71,13 @@ static PyMethodDef probedListObjectMethods[] = {
};
static PySequenceMethods probedListAsSequence = {
- probedListLength, /* length */
- 0, /* concat */
- 0, /* repeat */
- probedListSubscript, /* item */
- 0, /* slice */
- 0, /* assign item */
- 0, /* assign slice */
+ probedListLength, /* length */
+ 0, /* concat */
+ 0, /* repeat */
+ (intargfunc) probedListSubscript, /* item */
+ 0, /* slice */
+ 0, /* assign item */
+ 0, /* assign slice */
};
static PyTypeObject probedListType = {
@@ -322,6 +324,19 @@ static PyObject * doMount(PyObject * s, PyObject * args) {
return Py_None;
}
+static PyObject * doChroot(PyObject * s, PyObject * args) {
+ char * path;
+
+ if (!PyArg_ParseTuple(args, "s", &path)) return NULL;
+
+ if (chroot (path)) {
+ PyErr_SetFromErrno(PyExc_SystemError);
+ return NULL;
+ }
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
static PyObject * smpAvailable(PyObject * s, PyObject * args) {
int result;