summaryrefslogtreecommitdiff
path: root/sys/compat/common
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-14 13:28:24 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-14 13:28:24 +0000
commit995b695f2b06ee188ae993334bc83e25a3bc3fd0 (patch)
tree4e9dd1175963150f3333bc4515116450a9d370b2 /sys/compat/common
parent21e55531a498e82f6643babf57257f1ebe43fb71 (diff)
use fo_stat in fileops instead of huge switch statements.
Diffstat (limited to 'sys/compat/common')
-rw-r--r--sys/compat/common/vfs_syscalls_43.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/sys/compat/common/vfs_syscalls_43.c b/sys/compat/common/vfs_syscalls_43.c
index 0a5aa07e8b6..91e03cf4076 100644
--- a/sys/compat/common/vfs_syscalls_43.c
+++ b/sys/compat/common/vfs_syscalls_43.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls_43.c,v 1.13 2001/05/14 12:11:53 art Exp $ */
+/* $OpenBSD: vfs_syscalls_43.c,v 1.14 2001/05/14 13:28:22 art Exp $ */
/* $NetBSD: vfs_syscalls_43.c,v 1.4 1996/03/14 19:31:52 christos Exp $ */
/*
@@ -199,26 +199,7 @@ compat_43_sys_fstat(p, v, retval)
if ((u_int)fd >= fdp->fd_nfiles ||
(fp = fdp->fd_ofiles[fd]) == NULL)
return (EBADF);
- switch (fp->f_type) {
-
- case DTYPE_VNODE:
- error = vn_statfile(fp, &ub, p);
- break;
-
- case DTYPE_SOCKET:
- error = soo_stat(fp, &ub, p);
- break;
-
-#ifndef OLD_PIPE
- case DTYPE_PIPE:
- error = pipe_stat(fp, &ub, p);
- break;
-#endif
-
- default:
- panic("ofstat");
- /*NOTREACHED*/
- }
+ error = (*fp->f_ops->fo_stat)(fp, &ub, p);
cvtstat(&ub, &oub);
if (error == 0)
error = copyout((caddr_t)&oub, (caddr_t)SCARG(uap, sb),