summaryrefslogtreecommitdiffstats
path: root/usr.bin/fstat
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-06-17 17:16:53 +0000
committerphk <phk@FreeBSD.org>2004-06-17 17:16:53 +0000
commit40dd98a3bd2049465e7644b361b60da41a46efa0 (patch)
treefe8b297144afd6d6f7db41275c72cb5eb663ec02 /usr.bin/fstat
parent9acfe1e733142ca875624a3acbf96c4ff27b36a4 (diff)
downloadFreeBSD-src-40dd98a3bd2049465e7644b361b60da41a46efa0.zip
FreeBSD-src-40dd98a3bd2049465e7644b361b60da41a46efa0.tar.gz
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.
Diffstat (limited to 'usr.bin/fstat')
-rw-r--r--usr.bin/fstat/fstat.c12
-rw-r--r--usr.bin/fstat/fstat.h2
2 files changed, 7 insertions, 7 deletions
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);
OpenPOWER on IntegriCloud