.I ignore
causes the line to be ignored. This is useful
to show disk partitions which are currently unused.
+An entry
+.I none
+is useful for bind or move mounts.
The fourth field,
.RI ( fs_mntops ),
.br
.B "mount --bind olddir newdir"
.RE
+or fstab entry is:
+.RS
+.br
+.B "/olddir /newdir none bind"
+.RE
After this call the same contents is accessible in two places.
One can also remount a single file (on a single file).
if (!external_allowed)
return 0;
- if (type && strlen(type) < 100) {
+ if (type == NULL || strcmp(type, "none") == 0)
+ return 0;
+
+ if (strlen(type) < 100) {
sprintf(mountprog, "/sbin/mount.%s", type);
if (stat(mountprog, &statbuf) == 0) {
if (verbose)
if (*types && strcasecmp (*types, "auto") == 0)
*types = NULL;
- if (!*types && (flags & (MS_BIND | MS_MOVE)))
- *types = "none"; /* random, but not "bind" */
+ if (flags & (MS_BIND | MS_MOVE))
+ *types = "none";
if (!*types && !(flags & MS_REMOUNT)) {
*types = guess_fstype_by_devname(spec);
if (!external_allowed)
return 0;
- if (type && strlen(type) < 100) {
+ if (type == NULL || strcmp(type, "none") == 0)
+ return 0;
+
+ if (strlen(type) < 100) {
sprintf(umountprog, "/sbin/umount.%s", type);
if (stat(umountprog, &statbuf) == 0) {
res = fork();