aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2008-06-16 17:34:59 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2008-06-16 17:34:59 +0000
commit05427aafc6de1e9f752cd413178ea1bbac7b62ac (patch)
tree8e320b542868d0439ab549cd9da52c45bb24aabf /usr.bin
parent4c20b7670c3a3300079a9f4880af9552f7f14977 (diff)
downloadsrc-05427aafc6de1e9f752cd413178ea1bbac7b62ac.tar.gz
src-05427aafc6de1e9f752cd413178ea1bbac7b62ac.zip
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/fstat/fstat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index 90ffba8207a6..886c3bb4746c 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -97,6 +97,7 @@ __FBSDID("$FreeBSD$");
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
+#include <stddef.h>
#include <string.h>
#include <unistd.h>
#include <netdb.h>
@@ -895,10 +896,8 @@ dev_t
dev2udev(struct cdev *dev)
{
struct cdev_priv priv;
- struct cdev si;
- if (KVM_READ(dev, &si, sizeof si) &&
- KVM_READ(si.si_priv, &priv, sizeof priv)) {
+ if (KVM_READ(cdev2priv(dev), &priv, sizeof priv)) {
return ((dev_t)priv.cdp_inode);
} else {
dprintf(stderr, "can't convert cdev *%p to a dev_t\n", dev);