Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/route Support RUMP_ACTION to compile a rump kernel client.
details: https://anonhg.NetBSD.org/src/rev/9c26d07da72f
branches: trunk
changeset: 758444:9c26d07da72f
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Nov 04 23:36:10 2010 +0000
description:
Support RUMP_ACTION to compile a rump kernel client.
diffstat:
sbin/route/Makefile | 13 ++++++++++++-
sbin/route/route.c | 17 ++++++++++++++---
2 files changed, 26 insertions(+), 4 deletions(-)
diffs (70 lines):
diff -r 57549a5e7ff4 -r 9c26d07da72f sbin/route/Makefile
--- a/sbin/route/Makefile Thu Nov 04 23:31:12 2010 +0000
+++ b/sbin/route/Makefile Thu Nov 04 23:36:10 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2006/08/26 15:26:02 matt Exp $
+# $NetBSD: Makefile,v 1.24 2010/11/04 23:36:10 pooka Exp $
# @(#)Makefile 8.1 (Berkeley) 6/5/93
.include <bsd.own.mk>
@@ -20,4 +20,15 @@
# keywords.c keywords.h : keywords.sh
# ${HOST_SH} keywords.sh
+#
+# Compile-time debug flag. If compiled with "make RUMP_ACTION=1",
+# make rump system calls.
+#
+.ifdef RUMP_ACTION
+CPPFLAGS+= -DRUMP_SYS_NETWORKING -DRUMP_SYS_READWRITE -DRUMP_SYS_CLOSE
+CPPFLAGS+= -DRUMP_ACTION -DSMALL -Dsysctl=rump_sys___sysctl
+LDADD+= -lrumpclient
+DBG= -g
+.endif
+
.include <bsd.prog.mk>
diff -r 57549a5e7ff4 -r 9c26d07da72f sbin/route/route.c
--- a/sbin/route/route.c Thu Nov 04 23:31:12 2010 +0000
+++ b/sbin/route/route.c Thu Nov 04 23:36:10 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.121 2010/06/26 14:29:36 kefren Exp $ */
+/* $NetBSD: route.c,v 1.122 2010/11/04 23:36:10 pooka Exp $ */
/*
* Copyright (c) 1983, 1989, 1991, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: route.c,v 1.121 2010/06/26 14:29:36 kefren Exp $");
+__RCSID("$NetBSD: route.c,v 1.122 2010/11/04 23:36:10 pooka Exp $");
#endif
#endif /* not lint */
@@ -71,6 +71,12 @@
#include <paths.h>
#include <err.h>
+#ifdef RUMP_ACTION
+#include <rump/rump.h>
+#include <rump/rump_syscalls.h>
+#include <rump/rumpclient.h>
+#endif
+
#include "keywords.h"
#include "extern.h"
@@ -154,7 +160,12 @@
int
main(int argc, char * const *argv)
{
- int ch;
+ int ch, error;
+
+#ifdef RUMP_ACTION
+ if ((error = rumpclient_init()) != 0)
+ errx(1, "rump client init: %s", strerror(error));
+#endif
if (argc < 2)
usage(NULL);
Home |
Main Index |
Thread Index |
Old Index