Page MenuHomeFreeBSD

D48177.diff
No OneTemporary

D48177.diff

diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -892,9 +892,11 @@
putfsent(struct statfs *ent)
{
struct fstab *fst;
+ const char *mntfromname;
char *opts, *rw;
int l;
+ mntfromname = ent->f_mntfromname;
opts = NULL;
/* flags2opts() doesn't return the "rw" option. */
if ((ent->f_flags & MNT_RDONLY) != 0)
@@ -905,16 +907,14 @@
opts = flags2opts(ent->f_flags);
opts = catopt(rw, opts);
- if (strncmp(ent->f_mntfromname, "<below>", 7) == 0 ||
- strncmp(ent->f_mntfromname, "<above>", 7) == 0) {
- strlcpy(ent->f_mntfromname,
- (strnstr(ent->f_mntfromname, ":", 8) +1),
- sizeof(ent->f_mntfromname));
+ if (strncmp(mntfromname, "<below>:", 8) == 0 ||
+ strncmp(mntfromname, "<above>:", 8) == 0) {
+ mntfromname += 8;
}
- l = strlen(ent->f_mntfromname);
+ l = strlen(mntfromname);
xo_emit("{:device}{P:/%s}{P:/%s}{P:/%s}",
- ent->f_mntfromname,
+ mntfromname,
l < 8 ? "\t" : "",
l < 16 ? "\t" : "",
l < 24 ? "\t" : " ");
@@ -930,7 +930,7 @@
l < 8 ? "\t" : " ");
free(opts);
- if ((fst = getfsspec(ent->f_mntfromname)))
+ if ((fst = getfsspec(mntfromname)))
xo_emit("{P:\t}{n:dump/%u}{P: }{n:pass/%u}\n",
fst->fs_freq, fst->fs_passno);
else if ((fst = getfsfile(ent->f_mntonname)))

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 14, 6:21 AM (21 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15571497
Default Alt Text
D48177.diff (1 KB)

Event Timeline