diff --git a/lib/libkvm/kvm_getswapinfo.c b/lib/libkvm/kvm_getswapinfo.c index 535a9d073201..05aeedfd7397 100644 --- a/lib/libkvm/kvm_getswapinfo.c +++ b/lib/libkvm/kvm_getswapinfo.c @@ -191,7 +191,7 @@ kvm_getswapinfo( sizeof(swap_ary[i].ksw_devname), "%s%s", ((flags & SWIF_DEV_PREFIX) ? "/dev/" : ""), - devname(swinfo.sw_dev, S_IFBLK) + devname(swinfo.sw_dev, S_IFCHR) ); } } diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 02687c2bb011..ad62d2a8ced2 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -251,15 +251,6 @@ dev2udev(dev_t x) return (x->si_udev); } -udev_t -dev2budev(dev_t x) -{ - if (x == NODEV) - return NOUDEV; - else - return makeudev(devsw(x)->d_bmaj, minor(x)); -} - dev_t udev2dev(udev_t x, int b) { diff --git a/sys/miscfs/devfs/devfs_vnops.c b/sys/miscfs/devfs/devfs_vnops.c index 08feee282231..54d14d485dca 100644 --- a/sys/miscfs/devfs/devfs_vnops.c +++ b/sys/miscfs/devfs/devfs_vnops.c @@ -415,10 +415,12 @@ DBPRINT(("getattr\n")); vap->va_rdev = dev2udev(vp->v_rdev); vap->va_mode |= (S_IFCHR); break; +#if nolonger case DEV_BDEV: vap->va_rdev = dev2budev(vp->v_rdev); vap->va_mode |= (S_IFBLK); break; +#endif case DEV_SLNK: break; } diff --git a/sys/sys/systm.h b/sys/sys/systm.h index c05e554fea3b..92bde9a0744a 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -297,7 +297,6 @@ int major(dev_t x); int minor(dev_t x); dev_t makedev(int x, int y); udev_t dev2udev(dev_t x); -udev_t dev2budev(dev_t x); dev_t udev2dev(udev_t x, int b); int uminor(udev_t dev); int umajor(udev_t dev); diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c index d0f2f26924c4..08825b13a47d 100644 --- a/sys/vm/vm_swap.c +++ b/sys/vm/vm_swap.c @@ -247,7 +247,7 @@ swaponvp(p, vp, dev, nblks) nblks = dbtoc(nblks); sp->sw_vp = vp; - sp->sw_dev = dev2budev(dev); + sp->sw_dev = dev2udev(dev); sp->sw_device = dev; sp->sw_flags |= SW_FREED; sp->sw_nblks = nblks;