X-Git-Url: http://git.onelab.eu/?p=lxc-userspace.git;a=blobdiff_plain;f=setns.c;h=e562cd67f1d07e8b6f0e351997eedf4c79d431d9;hp=e82bd261df077c8137a1056d8ebc63dceb5ad02f;hb=599fef7a8160912979226e6b2ddfdc373aad9fdf;hpb=a48641c75412f0bbd8416af26f94ca1b5792294b diff --git a/setns.c b/setns.c index e82bd26..e562cd6 100644 --- a/setns.c +++ b/setns.c @@ -4,6 +4,25 @@ #include #include +static PyObject * +proc_mount(PyObject *self, PyObject *args) +{ + int sts; + sts = mount("none","/proc","proc",0,NULL); + + return Py_BuildValue("i", sts); +} + +static PyObject * +proc_umount(PyObject *self, PyObject *args) +{ + int sts; + sts = umount("/proc"); + + return Py_BuildValue("i", sts); + +} + static PyObject * chfscontext(PyObject *self, PyObject *args) { @@ -28,25 +47,6 @@ out: return Py_BuildValue("i", sts); } -static PyObject * -proc_mount(PyObject *self, PyObject *args) -{ - int sts; - sts = mount("none","/proc","proc",0,NULL); - - return Py_BuildValue("i", sts); -} - -static PyObject * -proc_umount(PyObject *self, PyObject *args) -{ - int sts; - sts = umount("/proc"); - - return Py_BuildValue("i", sts); - -} - static PyObject * chcontext(PyObject *self, PyObject *args) {