1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

Report swapdevices as cdevs rather than bdevs.

Remove unused dev2budev() function.
This commit is contained in:
Poul-Henning Kamp 1999-11-29 21:37:18 +00:00
parent da142cb3a7
commit c464420c89
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53899
5 changed files with 4 additions and 12 deletions

View File

@ -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)
);
}
}

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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);

View File

@ -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;