summaryrefslogtreecommitdiffstats
path: root/usr.bin/fstat
diff options
context:
space:
mode:
authorssouhlal <ssouhlal@FreeBSD.org>2005-01-11 18:52:12 +0000
committerssouhlal <ssouhlal@FreeBSD.org>2005-01-11 18:52:12 +0000
commit77d4c051f22357559ab1064bfde4323baf2020af (patch)
tree5c1330c5b4568a0fca4ba09fbfcf157af90586fd /usr.bin/fstat
parent209f9251cf47d42d180b091952267dc7be6c37ad (diff)
downloadFreeBSD-src-77d4c051f22357559ab1064bfde4323baf2020af.zip
FreeBSD-src-77d4c051f22357559ab1064bfde4323baf2020af.tar.gz
Get the vnode from file.f_vnode instead of file.f_data.
Nowadays, f_data points to the vnode only if the underlying filesystem doesn't use it for other purposes (devfs uses it to store the cdev, for example). Found by: csjp Reviewed by: csjp Approved by: phk, wes, grehan (mentor) MFC after: 1 week
Diffstat (limited to 'usr.bin/fstat')
-rw-r--r--usr.bin/fstat/fstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index 4ed1a78..a20469e 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -375,7 +375,7 @@ dofiles(struct kinfo_proc *kp)
continue;
}
if (file.f_type == DTYPE_VNODE)
- vtrans(file.f_data, i, file.f_flag);
+ vtrans(file.f_vnode, i, file.f_flag);
else if (file.f_type == DTYPE_SOCKET) {
if (checkfile == 0)
socktrans(file.f_data, i);
@@ -389,7 +389,7 @@ dofiles(struct kinfo_proc *kp)
#ifdef DTYPE_FIFO
else if (file.f_type == DTYPE_FIFO) {
if (checkfile == 0)
- vtrans(file.f_data, i, file.f_flag);
+ vtrans(file.f_vnode, i, file.f_flag);
}
#endif
else {
OpenPOWER on IntegriCloud