.B \-\-pseudo
Print only pseudo filesystems.
.TP
+.B \-\-shadowed
+Print only filesystems over-mounted by another filesystem.
+.TP
.BR \-R , " \-\-submounts"
Print recursively all submounts for the selected filesystems. The restrictions
defined by options \fB\-t\fP, \fB\-O\fP, \fB\-S\fP, \fB\-T\fP and
if ((flags & FL_PSEUDO) && !mnt_fs_is_pseudofs(fs))
return rc;
+ if ((flags & FL_SHADOWED)) {
+ struct libmnt_table *tb = NULL;
+
+ mnt_fs_get_table(fs, &tb);
+ if (tb && mnt_table_over_fs(tb, fs, NULL) != 0)
+ return rc;
+ }
+
return !rc;
}
fputs(_(" --output-all output all available columns\n"), out);
fputs(_(" -P, --pairs use key=\"value\" output format\n"), out);
fputs(_(" --pseudo print only pseudo-filesystems\n"), out);
+ fputs(_(" --shadowed print only filesystems over-mounted by another filesystem\n"), out);
fputs(_(" -R, --submounts print all submounts for the matching filesystems\n"), out);
fputs(_(" -r, --raw use raw output format\n"), out);
fputs(_(" --real print only real filesystems\n"), out);
FINDMNT_OPT_OUTPUT_ALL,
FINDMNT_OPT_PSEUDO,
FINDMNT_OPT_REAL,
- FINDMNT_OPT_VFS_ALL
+ FINDMNT_OPT_VFS_ALL,
+ FINDMNT_OPT_SHADOWED
};
static const struct option longopts[] = {
{ "real", no_argument, NULL, FINDMNT_OPT_REAL },
{ "pseudo", no_argument, NULL, FINDMNT_OPT_PSEUDO },
{ "vfs-all", no_argument, NULL, FINDMNT_OPT_VFS_ALL },
+ { "shadowed", no_argument, NULL, FINDMNT_OPT_SHADOWED },
{ NULL, 0, NULL, 0 }
};
case FINDMNT_OPT_VFS_ALL:
flags |= FL_VFS_ALL;
break;
+ case FINDMNT_OPT_SHADOWED:
+ flags |= FL_SHADOWED;
+ break;
case 'h':
usage();
FL_PSEUDO = (1 << 17),
FL_REAL = (1 << 18),
FL_VFS_ALL = (1 << 19),
+ FL_SHADOWED = (1 << 20),
/* basic table settings */
- FL_ASCII = (1 << 20),
- FL_RAW = (1 << 21),
- FL_NOHEADINGS = (1 << 22),
- FL_EXPORT = (1 << 23),
- FL_TREE = (1 << 24),
- FL_JSON = (1 << 25),
+ FL_ASCII = (1 << 21),
+ FL_RAW = (1 << 22),
+ FL_NOHEADINGS = (1 << 23),
+ FL_EXPORT = (1 << 24),
+ FL_TREE = (1 << 25),
+ FL_JSON = (1 << 26),
};
extern struct libmnt_cache *cache;