summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-05-11 16:47:28 +0000
committerErik Troan <ewt@redhat.com>2000-05-11 16:47:28 +0000
commitacbe6b20f09f14f6b592df1d166b54a991b373e0 (patch)
tree310bd63abf49e23156f7eb625a0f79d324e1cd34 /isys
parent67c9c45204ac95291fca89eebb8b600d08fa60d4 (diff)
downloadanaconda-acbe6b20f09f14f6b592df1d166b54a991b373e0.tar.gz
anaconda-acbe6b20f09f14f6b592df1d166b54a991b373e0.tar.xz
anaconda-acbe6b20f09f14f6b592df1d166b54a991b373e0.zip
able to mount filesytems read only
Diffstat (limited to 'isys')
-rw-r--r--isys/isys.c6
-rw-r--r--isys/isys.py4
2 files changed, 6 insertions, 4 deletions
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)