Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Move hw.machine and hw.machine_arch sysctls to base so r...
details: https://anonhg.NetBSD.org/src/rev/dab9664b86f6
branches: trunk
changeset: 339237:dab9664b86f6
user: justin <justin%NetBSD.org@localhost>
date: Tue Jul 07 12:38:02 2015 +0000
description:
Move hw.machine and hw.machine_arch sysctls to base so rump can use them
This allows uname(3) and uname(1) to work on rump kernels.
diffstat:
sys/kern/init_sysctl.c | 16 ++--------------
sys/kern/init_sysctl_base.c | 17 +++++++++++++++--
sys/rump/librump/rumpkern/rump.c | 5 +++--
3 files changed, 20 insertions(+), 18 deletions(-)
diffs (109 lines):
diff -r c9aa1f423848 -r dab9664b86f6 sys/kern/init_sysctl.c
--- a/sys/kern/init_sysctl.c Tue Jul 07 09:30:24 2015 +0000
+++ b/sys/kern/init_sysctl.c Tue Jul 07 12:38:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init_sysctl.c,v 1.207 2015/05/20 11:17:24 pooka Exp $ */
+/* $NetBSD: init_sysctl.c,v 1.208 2015/07/07 12:38:02 justin Exp $ */
/*-
* Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.207 2015/05/20 11:17:24 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.208 2015/07/07 12:38:02 justin Exp $");
#include "opt_sysv.h"
#include "opt_compat_netbsd.h"
@@ -615,12 +615,6 @@
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
- CTLTYPE_STRING, "machine",
- SYSCTL_DESCR("Machine class"),
- NULL, 0, machine, 0,
- CTL_HW, HW_MACHINE, CTL_EOL);
- sysctl_createv(clog, 0, NULL, NULL,
- CTLFLAG_PERMANENT,
CTLTYPE_STRING, "model",
SYSCTL_DESCR("Machine model"),
NULL, 0, __UNCONST(model), 0,
@@ -658,12 +652,6 @@
NULL, PAGE_SIZE, NULL, 0,
CTL_HW, HW_PAGESIZE, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
- CTLFLAG_PERMANENT,
- CTLTYPE_STRING, "machine_arch",
- SYSCTL_DESCR("Machine CPU class"),
- NULL, 0, machine_arch, 0,
- CTL_HW, HW_MACHINE_ARCH, CTL_EOL);
- sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE,
CTLTYPE_INT, "alignbytes",
SYSCTL_DESCR("Alignment constraint for all possible "
diff -r c9aa1f423848 -r dab9664b86f6 sys/kern/init_sysctl_base.c
--- a/sys/kern/init_sysctl_base.c Tue Jul 07 09:30:24 2015 +0000
+++ b/sys/kern/init_sysctl_base.c Tue Jul 07 12:38:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init_sysctl_base.c,v 1.3 2014/02/25 18:30:11 pooka Exp $ */
+/* $NetBSD: init_sysctl_base.c,v 1.4 2015/07/07 12:38:02 justin Exp $ */
/*-
* Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,8 +30,9 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_sysctl_base.c,v 1.3 2014/02/25 18:30:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_sysctl_base.c,v 1.4 2015/07/07 12:38:02 justin Exp $");
+#include <sys/cpu.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/kernel.h>
@@ -179,6 +180,18 @@
SYSCTL_DESCR("Raw partition of a disk"),
NULL, RAW_PART, NULL, 0,
CTL_KERN, KERN_RAWPARTITION, CTL_EOL);
+ sysctl_createv(clog, 0, NULL, NULL,
+ CTLFLAG_PERMANENT,
+ CTLTYPE_STRING, "machine",
+ SYSCTL_DESCR("Machine class"),
+ NULL, 0, machine, 0,
+ CTL_HW, HW_MACHINE, CTL_EOL);
+ sysctl_createv(clog, 0, NULL, NULL,
+ CTLFLAG_PERMANENT,
+ CTLTYPE_STRING, "machine_arch",
+ SYSCTL_DESCR("Machine CPU class"),
+ NULL, 0, machine_arch, 0,
+ CTL_HW, HW_MACHINE_ARCH, CTL_EOL);
}
/*
diff -r c9aa1f423848 -r dab9664b86f6 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c Tue Jul 07 09:30:24 2015 +0000
+++ b/sys/rump/librump/rumpkern/rump.c Tue Jul 07 12:38:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.321 2015/06/08 12:16:47 pooka Exp $ */
+/* $NetBSD: rump.c,v 1.322 2015/07/07 12:38:02 justin Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.321 2015/06/08 12:16:47 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.322 2015/07/07 12:38:02 justin Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -89,6 +89,7 @@
#include "rump_dev_private.h"
char machine[] = MACHINE;
+char machine_arch[] = MACHINE_ARCH;
struct proc *initproc;
Home |
Main Index |
Thread Index |
Old Index