From 40dd98a3bd2049465e7644b361b60da41a46efa0 Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 17 Jun 2004 17:16:53 +0000 Subject: Second half of the dev_t cleanup. The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc. --- usr.bin/fstat/fstat.c | 12 ++++++------ usr.bin/fstat/fstat.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'usr.bin/fstat') diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 1578dd3..b329ec8 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -585,8 +585,8 @@ ufs_filestat(vp, fsp) return 0; } /* - * The st_dev from stat(2) is a udev_t. These kernel structures - * contain dev_t structures. We need to convert to udev to make + * The st_dev from stat(2) is a dev_t. These kernel structures + * contain cdev pointers. We need to convert to dev_t to make * comparisons */ fsp->fsid = dev2udev(inode.i_dev); @@ -875,10 +875,10 @@ bad: /* - * Read the cdev structure in the kernel (as pointed to by a dev_t) - * in order to work out the associated udev_t + * Read the cdev structure in the kernel in order to work out the + * associated dev_t */ -udev_t +dev_t dev2udev(dev) struct cdev *dev; { @@ -887,7 +887,7 @@ dev2udev(dev) if (KVM_READ(dev, &si, sizeof si)) { return si.si_udev; } else { - dprintf(stderr, "can't convert dev_t %x to a udev_t\n", dev); + dprintf(stderr, "can't convert cdev *%x to a dev_t\n", dev); return -1; } } diff --git a/usr.bin/fstat/fstat.h b/usr.bin/fstat/fstat.h index 9cfbd62..cf4e15a 100644 --- a/usr.bin/fstat/fstat.h +++ b/usr.bin/fstat/fstat.h @@ -64,7 +64,7 @@ extern kvm_t *kd; extern int vflg; extern int Pid; -udev_t dev2udev(struct cdev *dev); +dev_t dev2udev(struct cdev *dev); /* Additional filesystem types */ int isofs_filestat(struct vnode *vp, struct filestat *fsp); -- cgit v1.1