diff options
-rw-r--r-- | lib/libkvm/kvm_getswapinfo.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_conf.c | 9 | ||||
-rw-r--r-- | sys/miscfs/devfs/devfs_vnops.c | 2 | ||||
-rw-r--r-- | sys/sys/systm.h | 1 | ||||
-rw-r--r-- | sys/vm/vm_swap.c | 2 |
5 files changed, 4 insertions, 12 deletions
diff --git a/lib/libkvm/kvm_getswapinfo.c b/lib/libkvm/kvm_getswapinfo.c index 535a9d0..05aeedf 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 02687c2..ad62d2a 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 08feee2..54d14d4 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 c05e554..92bde9a 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 d0f2f26..08825b1 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; |