summaryrefslogtreecommitdiff
path: root/sys/compat/svr4/svr4_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/svr4/svr4_ioctl.c')
-rw-r--r--sys/compat/svr4/svr4_ioctl.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/compat/svr4/svr4_ioctl.c b/sys/compat/svr4/svr4_ioctl.c
index f70b03d6f36..5586be3f055 100644
--- a/sys/compat/svr4/svr4_ioctl.c
+++ b/sys/compat/svr4/svr4_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_ioctl.c,v 1.9 2001/10/26 12:03:27 art Exp $ */
+/* $OpenBSD: svr4_ioctl.c,v 1.10 2002/02/13 19:08:06 art Exp $ */
/* $NetBSD: svr4_ioctl.c,v 1.16 1996/04/11 12:54:41 christos Exp $ */
/*
@@ -95,6 +95,7 @@ svr4_sys_ioctl(p, v, retval)
u_long cmd;
int (*fun) __P((struct file *, struct proc *, register_t *,
int, u_long, caddr_t));
+ int error = 0;
#ifdef DEBUG_SVR4
char dir[4];
char c;
@@ -142,11 +143,16 @@ svr4_sys_ioctl(p, v, retval)
case SVR4_XIOC:
/* We do not support those */
- return (EINVAL);
+ error = EINVAL;
+ goto out;
default:
DPRINTF(("Unimplemented ioctl %lx\n", cmd));
- return (0); /* XXX: really ENOSYS */
+ error = 0; /* XXX: really ENOSYS */
+ goto out;
}
- return (*fun)(fp, p, retval, SCARG(uap, fd), cmd, SCARG(uap, data));
+ error = (*fun)(fp, p, retval, SCARG(uap, fd), cmd, SCARG(uap, data));
+out:
+ FRELE(fp);
+ return (error);
}