return &fstab;
}
+#if 0
static void
my_free(const void *s) {
if (s)
free(mc);
}
}
+#endif
static void
read_mntentchn(mntFILE *mfp, const char *fnam, struct mntentchn *mc0) {
*/
void
-update_mtab (const char *dir, struct mntent *instead) {
+update_mtab (const char *dir, struct mntent *instead)
+{
mntFILE *mfp, *mftmp;
const char *fnam = MOUNTED;
struct mntentchn mtabhead; /* dummy */
}
}
+#if 0
+ /* the chain might have strings copied from 'instead',
+ * so we cannot safely free it.
+ * And there is no need anyway because we are going to exit
+ * shortly. So just don't call discard_mntentchn....
+ */
discard_mntentchn(mc0);
-
+#endif
if (fchmod (fileno (mftmp->mntent_fp),
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) < 0) {
int errsv = errno;
ment.mnt_freq = 0;
ment.mnt_passno= 0;
+ if(flags & MS_REMOUNT) {
+ update_mtab(ment.mnt_dir, &ment);
+ return 0;
+ }
+
lock_mtab();
if ((mtab = setmntent(MOUNTED, "a+")) == NULL) {