From 7a13f01f6fda7bd9f85af002d8630ec108ad8c38 Mon Sep 17 00:00:00 2001 From: Suleiman Souhlal Date: Tue, 11 Jan 2005 18:52:12 +0000 Subject: [PATCH] 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 --- usr.bin/fstat/fstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 4ed1a78b48ca..a20469e63742 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 {