Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-compat]: src Create the compat_util module for use by version-s...
details: https://anonhg.NetBSD.org/src/rev/f8724302a3da
branches: pgoyette-compat
changeset: 321135:f8724302a3da
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Fri Mar 30 23:57:59 2018 +0000
description:
Create the compat_util module for use by version-specific compat code.
(It's automatically included in the monolithic compat module, as well
as in kernels with built-in compat code.)
diffstat:
distrib/sets/lists/modules/mi | 4 +++-
sys/compat/common/compat_30_mod.c | 6 +++---
sys/compat/common/compat_util.c | 23 +++++++++++++++++++++--
sys/modules/Makefile | 9 +++++----
sys/modules/compat_util/Makefile | 11 +++++++++++
5 files changed, 43 insertions(+), 10 deletions(-)
diffs (131 lines):
diff -r 715681007315 -r f8724302a3da distrib/sets/lists/modules/mi
--- a/distrib/sets/lists/modules/mi Fri Mar 30 23:56:18 2018 +0000
+++ b/distrib/sets/lists/modules/mi Fri Mar 30 23:57:59 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.114.2.12 2018/03/30 11:18:34 pgoyette Exp $
+# $NetBSD: mi,v 1.114.2.13 2018/03/30 23:57:59 pgoyette Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -68,6 +68,8 @@
./@MODULEDIR@/coda5/coda5.kmod base-kernel-modules kmod
./@MODULEDIR@/compat base-kernel-modules kmod
./@MODULEDIR@/compat/compat.kmod base-kernel-modules kmod
+./@MODULEDIR@/compat_util base-kernel-modules kmod
+./@MODULEDIR@/compat_util/compat_util.kmod base-kernel-modules kmod
./@MODULEDIR@/compat_13 base-kernel-modules kmod
./@MODULEDIR@/compat_13/compat_13.kmod base-kernel-modules kmod
./@MODULEDIR@/compat_14 base-kernel-modules kmod
diff -r 715681007315 -r f8724302a3da sys/compat/common/compat_30_mod.c
--- a/sys/compat/common/compat_30_mod.c Fri Mar 30 23:56:18 2018 +0000
+++ b/sys/compat/common/compat_30_mod.c Fri Mar 30 23:57:59 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_30_mod.c,v 1.1.2.3 2018/03/29 11:20:02 pgoyette Exp $ */
+/* $NetBSD: compat_30_mod.c,v 1.1.2.4 2018/03/30 23:57:59 pgoyette Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_30_mod.c,v 1.1.2.3 2018/03/29 11:20:02 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_30_mod.c,v 1.1.2.4 2018/03/30 23:57:59 pgoyette Exp $");
#include <sys/systm.h>
#include <sys/module.h>
@@ -100,7 +100,7 @@
#ifdef _MODULE
-#define REQD_30 "compat_80,compat_70,compat_60,compat_50,compat_40"
+#define REQD_30 "compat_util,compat_80,compat_70,compat_60,compat_50,compat_40"
MODULE(MODULE_CLASS_EXEC, compat_30, REQD_30);
diff -r 715681007315 -r f8724302a3da sys/compat/common/compat_util.c
--- a/sys/compat/common/compat_util.c Fri Mar 30 23:56:18 2018 +0000
+++ b/sys/compat/common/compat_util.c Fri Mar 30 23:57:59 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_util.c,v 1.46.18.1 2018/03/06 10:37:41 pgoyette Exp $ */
+/* $NetBSD: compat_util.c,v 1.46.18.2 2018/03/30 23:57:59 pgoyette Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_util.c,v 1.46.18.1 2018/03/06 10:37:41 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_util.c,v 1.46.18.2 2018/03/30 23:57:59 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -73,6 +73,7 @@
#include <sys/vnode.h>
#include <sys/syslog.h>
#include <sys/mount.h>
+#include <sys/module.h>
#include <compat/common/compat_util.h>
@@ -155,3 +156,21 @@
}
return error;
}
+
+#ifdef _MODULE
+
+MODULE(MODULE_CLASS_MISC, compat_util, NULL);
+
+int
+compat_util_modcmd(modcmd_t cmd, void *arg)
+{
+
+ switch (cmd) {
+ case MODULE_CMD_INIT:
+ case MODULE_CMD_FINI:
+ return 0;
+ default:
+ return ENOTTY;
+ }
+}
+#endif /* _MODULE */
diff -r 715681007315 -r f8724302a3da sys/modules/Makefile
--- a/sys/modules/Makefile Fri Mar 30 23:56:18 2018 +0000
+++ b/sys/modules/Makefile Fri Mar 30 23:57:59 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.202.2.16 2018/03/30 11:18:34 pgoyette Exp $
+# $NetBSD: Makefile,v 1.202.2.17 2018/03/30 23:58:00 pgoyette Exp $
.include <bsd.own.mk>
@@ -6,9 +6,10 @@
# Modules for compatability with earlier versions of NetBSD
-SUBDIR+= compat compat_80 compat_70 compat_60 compat_50
-SUBDIR+= compat_40 compat_30 compat_20 compat_16 compat_14
-SUBDIR+= compat_13 #compat_12 compat_10 compat_09
+SUBDIR+= compat compat_util
+SUBDIR+= compat_80 compat_70 compat_60 compat_50 compat_40
+SUBDIR+= compat_30 compat_20 compat_16 compat_14 compat_13
+SUBDIR+= #compat_12 compat_10 compat_09
SUBDIR+= compat_ossaudio
SUBDIR+= compat_sysv
diff -r 715681007315 -r f8724302a3da sys/modules/compat_util/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/modules/compat_util/Makefile Fri Mar 30 23:57:59 2018 +0000
@@ -0,0 +1,11 @@
+# $NetBSD: Makefile,v 1.1.2.1 2018/03/30 23:58:00 pgoyette Exp $
+
+.include "../Makefile.inc"
+
+.PATH: ${S}/compat/common
+
+KMOD= compat_util
+
+SRCS+= compat_util.c compat_exec.c
+
+.include <bsd.kmodule.mk>
Home |
Main Index |
Thread Index |
Old Index