diff options
author | ssouhlal <ssouhlal@FreeBSD.org> | 2005-01-11 18:52:12 +0000 |
---|---|---|
committer | ssouhlal <ssouhlal@FreeBSD.org> | 2005-01-11 18:52:12 +0000 |
commit | 77d4c051f22357559ab1064bfde4323baf2020af (patch) | |
tree | 5c1330c5b4568a0fca4ba09fbfcf157af90586fd /usr.bin/fstat | |
parent | 209f9251cf47d42d180b091952267dc7be6c37ad (diff) | |
download | FreeBSD-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.c | 4 |
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 { |