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 Make all the compat_xx_{init, fin...



details:   https://anonhg.NetBSD.org/src/rev/44356e2aa802
branches:  pgoyette-compat
changeset: 321053:44356e2aa802
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sat Mar 17 00:44:38 2018 +0000

description:
Make all the compat_xx_{init,fini} routines return an int, whether or
not they currently need it.

diffstat:

 sys/compat/common/compat_70_mod.c |  18 ++++++++++--------
 sys/compat/common/compat_mod.h    |   6 +++---
 2 files changed, 13 insertions(+), 11 deletions(-)

diffs (78 lines):

diff -r c91ab3d5053e -r 44356e2aa802 sys/compat/common/compat_70_mod.c
--- a/sys/compat/common/compat_70_mod.c Sat Mar 17 00:42:31 2018 +0000
+++ b/sys/compat/common/compat_70_mod.c Sat Mar 17 00:44:38 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_70_mod.c,v 1.1.2.4 2018/03/16 08:10:26 pgoyette Exp $   */
+/*     $NetBSD: compat_70_mod.c,v 1.1.2.5 2018/03/17 00:44:38 pgoyette Exp $   */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.4 2018/03/16 08:10:26 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.5 2018/03/17 00:44:38 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -54,18 +54,22 @@
 #include <compat/net/route.h>
 #include <compat/net/route_70.h>
 
-void compat_70_init(void)
+int compat_70_init(void)
 {
 
        vec_ocreds_valid = true;
        rtsock_70_init();
+
+       return 0;
 }
 
-void compat_70_fini(void)
+int compat_70_fini(void)
 {
 
        rtsock_70_fini();
        vec_ocreds_valid = false;
+
+       return 0;
 }
 
 #ifdef _MODULE
@@ -78,12 +82,10 @@
 
        switch (cmd) {
        case MODULE_CMD_INIT:
-               compat_70_init();
-               return 0;
+               return compat_70_init();
 
        case MODULE_CMD_FINI:
-               compat_70_fini();
-               return 0;
+               return compat_70_fini();
 
        default:
                return ENOTTY;
diff -r c91ab3d5053e -r 44356e2aa802 sys/compat/common/compat_mod.h
--- a/sys/compat/common/compat_mod.h    Sat Mar 17 00:42:31 2018 +0000
+++ b/sys/compat/common/compat_mod.h    Sat Mar 17 00:44:38 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_mod.h,v 1.1.42.2 2018/03/16 08:10:26 pgoyette Exp $     */
+/*     $NetBSD: compat_mod.h,v 1.1.42.3 2018/03/17 00:44:38 pgoyette Exp $     */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -38,8 +38,8 @@
 void compat_sysctl_time(struct sysctllog **);
 void compat_sysctl_vfs(struct sysctllog **);
 
-void compat_70_init(void);
-void compat_70_fini(void);
+int compat_70_init(void);
+int compat_70_fini(void);
 
 int compat_60_init(void);
 int compat_60_fini(void);



Home | Main Index | Thread Index | Old Index