UFS VFS: initialize f_mntonname for the root mp
authorFrancois Tigeot <ftigeot@wolfpond.org>
Sat, 10 Dec 2011 18:24:00 +0000 (19:24 +0100)
committerFran├žois Tigeot <ftigeot@wolfpond.org>
Tue, 13 Dec 2011 07:55:46 +0000 (08:55 +0100)
Taken from: OpenBSD

sys/vfs/ufs/ffs_vfsops.c

index ec39119..7d9812e 100644 (file)
@@ -369,6 +369,8 @@ ffs_mount(struct mount *mp,         /* mount struct pointer */
                        copyinstr(path, mp->mnt_stat.f_mntonname,
                                  sizeof(mp->mnt_stat.f_mntonname) - 1,
                                  &size);
+               } else {        /* Root mount */
+                       mp->mnt_stat.f_mntonname[0] = '/';
                }
 
                error = ffs_mountfs(devvp, mp, M_FFSNODE);