diff options
-rw-r--r-- | isys/imount.c | 4 | ||||
-rw-r--r-- | isys/imount.h | 2 | ||||
-rw-r--r-- | isys/isys.c | 7 | ||||
-rw-r--r-- | isys/isys.py | 6 |
4 files changed, 11 insertions, 8 deletions
diff --git a/isys/imount.c b/isys/imount.c index a249888a0..d6416b146 100644 --- a/isys/imount.c +++ b/isys/imount.c @@ -14,7 +14,7 @@ static int mkdirIfNone(char * directory); int doPwMount(char * dev, char * where, char * fs, int rdonly, int istty, - char * acct, char * pw, int bindmnt) { + char * acct, char * pw, int bindmnt, int remount) { char * buf = NULL; int isnfs = 0; char * mount_opt = NULL; @@ -84,6 +84,8 @@ int doPwMount(char * dev, char * where, char * fs, int rdonly, int istty, flag |= MS_RDONLY; if (bindmnt) flag |= MS_BIND; + if (remount) + flag |= MS_REMOUNT; if (!strncmp(fs, "vfat", 4)) mount_opt="check=relaxed"; diff --git a/isys/imount.h b/isys/imount.h index 3f7e826bd..0907629b9 100644 --- a/isys/imount.h +++ b/isys/imount.h @@ -7,7 +7,7 @@ #include <sys/mount.h> /* for umount() */ int doPwMount(char * dev, char * where, char * fs, int rdonly, int istty, - char * acct, char * pw, int bindmnt); + char * acct, char * pw, int bindmnt, int remount); int mkdirChain(char * origChain); #endif diff --git a/isys/isys.c b/isys/isys.c index 872b84654..5083daa72 100644 --- a/isys/isys.c +++ b/isys/isys.c @@ -494,11 +494,12 @@ static PyObject * doMount(PyObject * s, PyObject * args) { int rc; int readOnly; int bindMount; + int reMount; - if (!PyArg_ParseTuple(args, "sssii", &fs, &device, &mntpoint, - &readOnly, &bindMount)) return NULL; + if (!PyArg_ParseTuple(args, "sssiii", &fs, &device, &mntpoint, + &readOnly, &bindMount, &reMount)) return NULL; - rc = doPwMount(device, mntpoint, fs, readOnly, 0, NULL, NULL, bindMount); + rc = doPwMount(device, mntpoint, fs, readOnly, 0, NULL, NULL, bindMount, reMount); if (rc == IMOUNT_ERR_ERRNO) PyErr_SetFromErrno(PyExc_SystemError); else if (rc) diff --git a/isys/isys.py b/isys/isys.py index d1e6f6dee..8d26d4f55 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -139,7 +139,7 @@ def ddfile(file, megs, pw = None): os.close(fd) -def mount(device, location, fstype = "ext2", readOnly = 0, bindMount = 0): +def mount(device, location, fstype = "ext2", readOnly = 0, bindMount = 0, remount = 0): location = os.path.normpath(location) # @@ -158,8 +158,8 @@ def mount(device, location, fstype = "ext2", readOnly = 0, bindMount = 0): mountCount[location] = mountCount[location] + 1 return - log("going to mount %s on %s" %(device, location)) - rc = _isys.mount(fstype, device, location, readOnly, bindMount) + log("isys.py:mount()- going to mount %s on %s" %(device, location)) + rc = _isys.mount(fstype, device, location, readOnly, bindMount, remount) if not rc: mountCount[location] = 1 |