mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Fix printing of unionfs mounts when using the -p option
PR: bin/75585 MFC after: 1 week
This commit is contained in:
parent
0aad0c5005
commit
031ea52f84
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175949
|
@ -81,7 +81,7 @@ int mountfs(const char *, const char *, const char *,
|
|||
int, const char *, const char *);
|
||||
void remopt(char *, const char *);
|
||||
void prmount(struct statfs *);
|
||||
void putfsent(const struct statfs *);
|
||||
void putfsent(struct statfs *);
|
||||
void usage(void);
|
||||
char *flags2opts(int);
|
||||
|
||||
|
@ -805,7 +805,7 @@ usage(void)
|
|||
}
|
||||
|
||||
void
|
||||
putfsent(const struct statfs *ent)
|
||||
putfsent(struct statfs *ent)
|
||||
{
|
||||
struct fstab *fst;
|
||||
char *opts;
|
||||
|
@ -813,6 +813,12 @@ putfsent(const struct statfs *ent)
|
|||
|
||||
opts = flags2opts(ent->f_flags);
|
||||
|
||||
if (strncmp(ent->f_mntfromname, "<below>", 7) == 0 ||
|
||||
strncmp(ent->f_mntfromname, "<above>", 7) == 0) {
|
||||
strcpy(ent->f_mntfromname, (strnstr(ent->f_mntfromname, ":", 8)
|
||||
+1));
|
||||
}
|
||||
|
||||
/*
|
||||
* "rw" is not a real mount option; this is why we print NULL as "rw"
|
||||
* if opts is still NULL here.
|
||||
|
|
Loading…
Reference in a new issue