diff options
author | phk <phk@FreeBSD.org> | 2004-11-09 23:03:34 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-11-09 23:03:34 +0000 |
commit | 6f9f259ced1a0072519e6a6859d10b11a0f1cf30 (patch) | |
tree | 241e3a99465662490349630f8b41ae28c39f4d4b /sys/kern/vfs_mount.c | |
parent | 7bef55364a66de53ef29f35f1db7f570128b78d2 (diff) | |
download | FreeBSD-src-6f9f259ced1a0072519e6a6859d10b11a0f1cf30.zip FreeBSD-src-6f9f259ced1a0072519e6a6859d10b11a0f1cf30.tar.gz |
Make getdiskbyname() static to vfs_mount.c.
Eliminate use of vn_todev() while here.
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r-- | sys/kern/vfs_mount.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index b892b03..32686b4 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -98,6 +98,7 @@ __FBSDID("$FreeBSD$"); #define VFS_MOUNTARG_SIZE_MAX (1024 * 64) static void checkdirs(struct vnode *olddp, struct vnode *newdp); +static struct cdev *getdiskbyname(char *_name); static void gets(char *cp); static int vfs_domount(struct thread *td, const char *fstype, char *fspath, int fsflags, void *fsdata, int compat); @@ -1449,7 +1450,7 @@ gets(char *cp) * we cannot use the vnode directly (because we unmount the DEVFS again) * so the filesystems still have to do the bdevvp() stunt. */ -struct cdev * +static struct cdev * getdiskbyname(char *name) { char *cp = name; @@ -1490,7 +1491,10 @@ getdiskbyname(char *name) error = lookup(&nid); if (error) break; - dev = vn_todev (nid.ni_vp); + if (nid.ni_vp->v_type != VCHR) + dev = NULL; + else + dev = nid.ni_vp->v_rdev; NDFREE(&nid, 0); } while (0); |