Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/puffs/mount_sysctlfs If compiled with RUMP_ACTION, ...
details: https://anonhg.NetBSD.org/src/rev/f86a29adfb63
branches: trunk
changeset: 756864:f86a29adfb63
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Aug 06 15:04:13 2010 +0000
description:
If compiled with RUMP_ACTION, access rump kernel instead of host
kernel. This is an easy way to browse & modify the sysctl tree
offered by a rump kernel instance.
diffstat:
usr.sbin/puffs/mount_sysctlfs/Makefile | 7 ++++++-
usr.sbin/puffs/mount_sysctlfs/sysctlfs.c | 19 +++++++++++++++++--
2 files changed, 23 insertions(+), 3 deletions(-)
diffs (66 lines):
diff -r bab5e6127647 -r f86a29adfb63 usr.sbin/puffs/mount_sysctlfs/Makefile
--- a/usr.sbin/puffs/mount_sysctlfs/Makefile Fri Aug 06 14:23:06 2010 +0000
+++ b/usr.sbin/puffs/mount_sysctlfs/Makefile Fri Aug 06 15:04:13 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2009/04/22 15:23:07 lukem Exp $
+# $NetBSD: Makefile,v 1.4 2010/08/06 15:04:13 pooka Exp $
PROG= mount_sysctlfs
SRCS= sysctlfs.c
@@ -8,4 +8,9 @@
MAN= mount_sysctlfs.8
+.ifdef RUMP_ACTION
+CPPFLAGS+= -DRUMP_ACTION
+LDADD+= -lrump -lrumpuser -lpthread
+.endif
+
.include <bsd.prog.mk>
diff -r bab5e6127647 -r f86a29adfb63 usr.sbin/puffs/mount_sysctlfs/sysctlfs.c
--- a/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c Fri Aug 06 14:23:06 2010 +0000
+++ b/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c Fri Aug 06 15:04:13 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysctlfs.c,v 1.14 2010/04/11 15:08:17 pooka Exp $ */
+/* $NetBSD: sysctlfs.c,v 1.15 2010/08/06 15:04:13 pooka Exp $ */
/*-
* Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: sysctlfs.c,v 1.14 2010/04/11 15:08:17 pooka Exp $");
+__RCSID("$NetBSD: sysctlfs.c,v 1.15 2010/08/06 15:04:13 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -50,6 +50,13 @@
#include <unistd.h>
#include <util.h>
+#ifdef RUMP_ACTION
+#include <rump/rump.h>
+#include <rump/rump_syscalls.h>
+
+#define sysctl(a,b,c,d,e,f) rump_sys___sysctl(a,b,c,d,e,f)
+#endif
+
PUFFSOP_PROTOS(sysctlfs)
struct sfsnode {
@@ -292,6 +299,14 @@
if (puffs_daemon(pu, 1, 1) == -1)
err(1, "puffs_daemon");
+#ifdef RUMP_ACTION
+ {
+ extern int puffs_fakecc;
+ puffs_fakecc = 1;
+ rump_init();
+ }
+#endif
+
if (puffs_mount(pu, argv[1], mntflags, puffs_getroot(pu)) == -1)
err(1, "puffs_mount");
if (puffs_mainloop(pu) == -1)
Home |
Main Index |
Thread Index |
Old Index