diff options
author | phk <phk@FreeBSD.org> | 1999-07-02 16:29:47 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-07-02 16:29:47 +0000 |
commit | b6d067fe706d7df16489c3e6138e2c68c483bd7c (patch) | |
tree | 6dd5d101ce37a738d8b0f531e7273f744862ab5d /sys/kern/vfs_subr.c | |
parent | 60d229e604f6fdbe9921b44b59b82b2469286d78 (diff) | |
download | FreeBSD-src-b6d067fe706d7df16489c3e6138e2c68c483bd7c.zip FreeBSD-src-b6d067fe706d7df16489c3e6138e2c68c483bd7c.tar.gz |
Make sure that stat(2) and friends always return a valid st_dev field.
Pseudo-FS need not fill in the va_fsid anymore, the syscall code
will use the first half of the fsid, which now looks like a udev_t
with major 255.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 579d214..8357241 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.203 1999/06/26 02:46:10 mckusick Exp $ + * $Id: vfs_subr.c,v 1.204 1999/07/01 13:21:41 peter Exp $ */ /* @@ -333,16 +333,17 @@ vfs_getnewfsid(mp) simple_lock(&mntid_slock); mtype = mp->mnt_vfc->vfc_typenum; - mp->mnt_stat.f_fsid.val[0] = (256 + mtype) * 256; + mp->mnt_stat.f_fsid.val[0] = umakedev(255, mtype); mp->mnt_stat.f_fsid.val[1] = mtype; if (xxxfs_mntid == 0) ++xxxfs_mntid; - tfsid.val[0] = (256 + mtype) * 256 | xxxfs_mntid; + tfsid.val[0] = umakedev(255, mtype + (xxxfs_mntid << 16)); tfsid.val[1] = mtype; if (mountlist.cqh_first != (void *)&mountlist) { while (vfs_getvfs(&tfsid)) { - tfsid.val[0]++; xxxfs_mntid++; + tfsid.val[0] = umakedev(255, + mtype + (xxxfs_mntid << 16)); } } mp->mnt_stat.f_fsid.val[0] = tfsid.val[0]; |