Source-Changes-HG archive

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

[src/pgoyette-compat]: src/sys/compat/common Use a .h file for declaring the ...



details:   https://anonhg.NetBSD.org/src/rev/95851e8102e4
branches:  pgoyette-compat
changeset: 320959:95851e8102e4
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue Mar 06 23:17:42 2018 +0000

description:
Use a .h file for declaring the if_40_{init, fini} routines

diffstat:

 sys/compat/common/compat_mod.c       |   7 ++---
 sys/compat/common/if_40.h            |  44 ++++++++++++++++++++++++++++++++++++
 sys/compat/common/uipc_syscalls_40.c |   6 +++-
 3 files changed, 51 insertions(+), 6 deletions(-)

diffs (100 lines):

diff -r 7976c42ead78 -r 95851e8102e4 sys/compat/common/compat_mod.c
--- a/sys/compat/common/compat_mod.c    Tue Mar 06 22:46:41 2018 +0000
+++ b/sys/compat/common/compat_mod.c    Tue Mar 06 23:17:42 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_mod.c,v 1.24.14.1 2018/03/06 05:46:06 pgoyette Exp $    */
+/*     $NetBSD: compat_mod.c,v 1.24.14.2 2018/03/06 23:17:42 pgoyette Exp $    */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.1 2018/03/06 05:46:06 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.2 2018/03/06 23:17:42 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -66,8 +66,7 @@
 #endif
 
 #ifdef COMPAT_40
-void if_40_init(void);
-void if_40_fini(void);
+#include <compat/common/if_40.h>
 #endif
 
 #ifdef COMPAT_50
diff -r 7976c42ead78 -r 95851e8102e4 sys/compat/common/if_40.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/compat/common/if_40.h Tue Mar 06 23:17:42 2018 +0000
@@ -0,0 +1,44 @@
+/*     $NetBSD: if_40.h,v 1.1.2.1 2018/03/06 23:17:42 pgoyette Exp $   */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Paul Goyette
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``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 FOUNDATION OR CONTRIBUTORS
+ * 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.
+ */
+
+#ifndef        _COMPAT_IF_40_H_
+#define        _COMPAT_IF_40_H_
+
+#if defined(COMPAT_40)
+extern u_long (*vec_compat_cvtcmd)(u_long); 
+extern int (*vec_compat_ifioctl)(struct socket *, u_long, u_long, 
+    void *, struct lwp *);
+
+void if_40_init(void);
+void if_40_fini(void);
+#endif
+
+#endif /* !_COMPAT_IF_40_H_ */
diff -r 7976c42ead78 -r 95851e8102e4 sys/compat/common/uipc_syscalls_40.c
--- a/sys/compat/common/uipc_syscalls_40.c      Tue Mar 06 22:46:41 2018 +0000
+++ b/sys/compat/common/uipc_syscalls_40.c      Tue Mar 06 23:17:42 2018 +0000
@@ -1,9 +1,9 @@
-/*     $NetBSD: uipc_syscalls_40.c,v 1.15.2.2 2018/03/06 22:46:41 pgoyette Exp $       */
+/*     $NetBSD: uipc_syscalls_40.c,v 1.15.2.3 2018/03/06 23:17:42 pgoyette Exp $       */
 
 /* written by Pavel Cahyna, 2006. Public domain. */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.2 2018/03/06 22:46:41 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.3 2018/03/06 23:17:42 pgoyette Exp $");
 
 /*
  * System call interface to the socket abstraction.
@@ -21,6 +21,8 @@
 #include <compat/sys/socket.h>
 #include <compat/sys/sockio.h>
 
+#include <compat/common/if_40.h>
+
 #ifdef COMPAT_OIFREQ
 /*
  * Return interface configuration



Home | Main Index | Thread Index | Old Index