summaryrefslogtreecommitdiffstats
path: root/usr.bin/fstat
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2003-01-12 01:37:13 +0000
committerdillon <dillon@FreeBSD.org>2003-01-12 01:37:13 +0000
commitddf9ef103e0a611c9a01425a28baf8a612b0d114 (patch)
tree19da0d56c468b8e0f6d0361d7d39157f561aa69f /usr.bin/fstat
parent07cbccc353d7afbe8948b6025965ca36739d7373 (diff)
downloadFreeBSD-src-ddf9ef103e0a611c9a01425a28baf8a612b0d114.zip
FreeBSD-src-ddf9ef103e0a611c9a01425a28baf8a612b0d114.tar.gz
Change struct file f_data to un_data, a union of the correct struct
pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit.
Diffstat (limited to 'usr.bin/fstat')
-rw-r--r--usr.bin/fstat/fstat.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index eb81388..d41011a 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -381,23 +381,21 @@ dofiles(kp)
continue;
}
if (file.f_type == DTYPE_VNODE)
- vtrans((struct vnode *)file.f_data, i, file.f_flag);
+ vtrans(file.un_data.vnode, i, file.f_flag);
else if (file.f_type == DTYPE_SOCKET) {
if (checkfile == 0)
- socktrans((struct socket *)file.f_data, i);
+ socktrans(file.un_data.socket, i);
}
#ifdef DTYPE_PIPE
else if (file.f_type == DTYPE_PIPE) {
if (checkfile == 0)
- pipetrans((struct pipe *)file.f_data, i,
- file.f_flag);
+ pipetrans(file.un_data.pipe, i, file.f_flag);
}
#endif
#ifdef DTYPE_FIFO
else if (file.f_type == DTYPE_FIFO) {
if (checkfile == 0)
- vtrans((struct vnode *)file.f_data, i,
- file.f_flag);
+ vtrans(file.un_data.vnode, i, file.f_flag);
}
#endif
else {
OpenPOWER on IntegriCloud