From 23c19aed33157875a3f828ae0e9ef31aae48fddc Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Wed, 20 Nov 2002 21:34:26 +0000 Subject: chroot is now in the os module, so let's make isys just do a simple wrapper for now. should change everything using isys.chroot to use os.chroot eventually --- isys/isys.c | 15 --------------- isys/isys.py | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) (limited to 'isys') diff --git a/isys/isys.c b/isys/isys.c index 4b3d1a91b..916c0c241 100644 --- a/isys/isys.c +++ b/isys/isys.c @@ -66,7 +66,6 @@ static PyObject * smpAvailable(PyObject * s, PyObject * args); static PyObject * htAvailable(PyObject * s, PyObject * args); static PyObject * summitAvailable(PyObject * s, PyObject * args); static PyObject * createProbedList(PyObject * s, PyObject * args); -static PyObject * doChroot(PyObject * s, PyObject * args); static PyObject * doCheckBoot(PyObject * s, PyObject * args); static PyObject * doCheckUFS(PyObject * s, PyObject * args); static PyObject * doSwapon(PyObject * s, PyObject * args); @@ -138,7 +137,6 @@ static PyMethodDef isysModuleMethods[] = { { "umount", (PyCFunction) doUMount, METH_VARARGS, NULL }, { "confignetdevice", (PyCFunction) doConfigNetDevice, METH_VARARGS, NULL }, { "pumpnetdevice", (PyCFunction) doPumpNetDevice, METH_VARARGS, NULL }, - { "chroot", (PyCFunction) doChroot, METH_VARARGS, NULL }, { "checkBoot", (PyCFunction) doCheckBoot, METH_VARARGS, NULL }, { "checkUFS", (PyCFunction) doCheckUFS, METH_VARARGS, NULL }, { "swapon", (PyCFunction) doSwapon, METH_VARARGS, NULL }, @@ -672,19 +670,6 @@ 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; -} - #define BOOT_SIGNATURE 0xaa55 /* boot signature */ #define BOOT_SIG_OFFSET 510 /* boot signature offset */ diff --git a/isys/isys.py b/isys/isys.py index 0c4f3502d..f4400eb06 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -206,7 +206,7 @@ def summitavailable(): return _isys.summitavailable() def chroot (path): - return _isys.chroot (path) + return os.chroot (path) def checkBoot (path): return _isys.checkBoot (path) -- cgit