From acbe6b20f09f14f6b592df1d166b54a991b373e0 Mon Sep 17 00:00:00 2001 From: Erik Troan Date: Thu, 11 May 2000 16:47:28 +0000 Subject: able to mount filesytems read only --- isys/isys.c | 6 ++++-- isys/isys.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'isys') diff --git a/isys/isys.c b/isys/isys.c index b9d3c3f08..2a87adc22 100644 --- a/isys/isys.c +++ b/isys/isys.c @@ -622,10 +622,12 @@ static PyObject * doUMount(PyObject * s, PyObject * args) { static PyObject * doMount(PyObject * s, PyObject * args) { char * fs, * device, * mntpoint; int rc; + int readOnly; - if (!PyArg_ParseTuple(args, "sss", &fs, &device, &mntpoint)) return NULL; + if (!PyArg_ParseTuple(args, "sssi", &fs, &device, &mntpoint, + &readOnly)) return NULL; - rc = doPwMount(device, mntpoint, fs, 0, 0, NULL, NULL); + rc = doPwMount(device, mntpoint, fs, readOnly, 0, NULL, NULL); if (rc == IMOUNT_ERR_ERRNO) PyErr_SetFromErrno(PyExc_SystemError); else if (rc) diff --git a/isys/isys.py b/isys/isys.py index 56fa8a649..2cd417cdd 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -63,8 +63,8 @@ def ddfile(file, megs): _isys.ddfile(fd, megs) os.close(fd) -def mount(device, location, fstype = "ext2"): - return _isys.mount(fstype, device, location) +def mount(device, location, fstype = "ext2", readOnly = 0): + return _isys.mount(fstype, device, location, readOnly) def umount(what): return _isys.umount(what) -- cgit