Report swapdevices as cdevs rather than bdevs.
Remove unused dev2budev() function.
This commit is contained in:
parent
da142cb3a7
commit
c464420c89
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53899
@ -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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user