1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00

Fix printing of unionfs mounts when using the -p option

PR:		 bin/75585
MFC after:	1 week
This commit is contained in:
Matteo Riondato 2008-02-03 17:23:58 +00:00
parent 0aad0c5005
commit 031ea52f84
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175949

View File

@ -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.