Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/osf1 do easy 'f'-class ioctls



details:   https://anonhg.NetBSD.org/src/rev/942c2f512752
branches:  trunk
changeset: 472350:942c2f512752
user:      cgd <cgd%NetBSD.org@localhost>
date:      Wed Apr 28 02:16:07 1999 +0000

description:
do easy 'f'-class ioctls

diffstat:

 sys/compat/osf1/osf1_ioctl.c |  64 +++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 63 insertions(+), 1 deletions(-)

diffs (92 lines):

diff -r 5c122c158bad -r 942c2f512752 sys/compat/osf1/osf1_ioctl.c
--- a/sys/compat/osf1/osf1_ioctl.c      Wed Apr 28 02:03:45 1999 +0000
+++ b/sys/compat/osf1/osf1_ioctl.c      Wed Apr 28 02:16:07 1999 +0000
@@ -1,4 +1,34 @@
-/*     $NetBSD: osf1_ioctl.c,v 1.8 1999/04/24 07:13:23 cgd Exp $       */
+/*     $NetBSD: osf1_ioctl.c,v 1.9 1999/04/28 02:16:07 cgd Exp $       */
+
+/*
+ * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by Christopher G. Demetriou
+ *     for the NetBSD Project.
+ * 4. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -43,6 +73,8 @@
 extern int scdebug;
 #endif
 
+int osf1_ioctl_f       __P((struct proc *p, struct sys_ioctl_args *nuap,
+                           register_t *retval, int cmd, int dir, int len));
 int osf1_ioctl_i       __P((struct proc *p, struct sys_ioctl_args *nuap,
                            register_t *retval, int cmd, int dir, int len));
 int osf1_ioctl_t       __P((struct proc *p, struct sys_ioctl_args *nuap,
@@ -107,6 +139,8 @@
        SCARG(&a, com) = SCARG(uap, com);
        SCARG(&a, data) = SCARG(uap, data);
        switch (group) {
+       case 'f':
+               return osf1_ioctl_f(p, &a, retval, cmd, dir, len);
        case 'i':
                return osf1_ioctl_i(p, &a, retval, cmd, dir, len);
        case 't':
@@ -117,6 +151,34 @@
 }
 
 int
+osf1_ioctl_f(p, uap, retval, cmd, dir, len)
+       struct proc *p;
+       struct sys_ioctl_args *uap;
+       register_t *retval;
+       int cmd;
+       int dir;
+       int len;
+{
+
+       switch (cmd) {
+       case 1:                         /* OSF/1 FIOCLEX */
+       case 2:                         /* OSF/1 FIONCLEX */
+       case 123:                       /* OSF/1 FIOGETOWN */
+       case 124:                       /* OSF/1 FIOSETOWN */
+       case 125:                       /* OSF/1 FIOASYNC */
+       case 126:                       /* OSF/1 FIONBIO */
+       case 127:                       /* OSF/1 FIONREAD */
+               /* same as in NetBSD */
+               break;
+               
+       default:
+               return (ENOTTY);
+       }
+
+       return sys_ioctl(p, uap, retval);
+}
+
+int
 osf1_ioctl_i(p, uap, retval, cmd, dir, len)
        struct proc *p;
        struct sys_ioctl_args *uap;



Home | Main Index | Thread Index | Old Index