Module Name: src
Committed By: pooka
Date: Tue Dec 14 08:04:15 UTC 2010
Modified Files:
src/common/lib/libprop: prop_kern.c
src/usr.sbin/envstat: Makefile envstat.c
Log Message:
Use a consistent approach for rump kernel calls made by libs.
Should investigate a dynamic approach in the future.
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/common/lib/libprop/prop_kern.c
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/envstat/Makefile
cvs rdiff -u -r1.83 -r1.84 src/usr.sbin/envstat/envstat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/common/lib/libprop/prop_kern.c
diff -u src/common/lib/libprop/prop_kern.c:1.13 src/common/lib/libprop/prop_kern.c:1.14
--- src/common/lib/libprop/prop_kern.c:1.13 Sun Oct 11 12:13:45 2009
+++ src/common/lib/libprop/prop_kern.c Tue Dec 14 08:04:14 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: prop_kern.c,v 1.13 2009/10/11 12:13:45 bad Exp $ */
+/* $NetBSD: prop_kern.c,v 1.14 2010/12/14 08:04:14 pooka Exp $ */
/*-
* Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
@@ -43,6 +43,11 @@
#include <stdlib.h>
#include <stdio.h>
+#ifdef RUMP_ACTION
+#include <rump/rump_syscalls.h>
+#define ioctl(a,b,c) rump_sys_ioctl(a,b,c)
+#endif
+
static int
_prop_object_externalize_to_pref(prop_object_t obj, struct plistref *pref, char **bufp)
{
Index: src/usr.sbin/envstat/Makefile
diff -u src/usr.sbin/envstat/Makefile:1.9 src/usr.sbin/envstat/Makefile:1.10
--- src/usr.sbin/envstat/Makefile:1.9 Mon Dec 13 18:00:38 2010
+++ src/usr.sbin/envstat/Makefile Tue Dec 14 08:04:14 2010
@@ -1,8 +1,12 @@
-# $NetBSD: Makefile,v 1.9 2010/12/13 18:00:38 pooka Exp $
+# $NetBSD: Makefile,v 1.10 2010/12/14 08:04:14 pooka Exp $
RUMPPRG= envstat
SRCS+= envstat.c config.c config_yacc.y config_lex.l
+.PATH: ${.CURDIR}/../../common/lib/libprop
+CPPFLAGS+= -DRUMP_ACTION
+RUMPSRCS+= prop_kern.c
+
LDADD= -lprop
DPADD= ${LIBPROP}
Index: src/usr.sbin/envstat/envstat.c
diff -u src/usr.sbin/envstat/envstat.c:1.83 src/usr.sbin/envstat/envstat.c:1.84
--- src/usr.sbin/envstat/envstat.c:1.83 Mon Dec 13 18:00:38 2010
+++ src/usr.sbin/envstat/envstat.c Tue Dec 14 08:04:14 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: envstat.c,v 1.83 2010/12/13 18:00:38 pooka Exp $ */
+/* $NetBSD: envstat.c,v 1.84 2010/12/14 08:04:14 pooka Exp $ */
/*-
* Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: envstat.c,v 1.83 2010/12/13 18:00:38 pooka Exp $");
+__RCSID("$NetBSD: envstat.c,v 1.84 2010/12/14 08:04:14 pooka Exp $");
#endif /* not lint */
#include <stdio.h>
@@ -117,20 +117,6 @@
static int sysmonfd; /* fd of /dev/sysmon */
-/* sneak in between ioctl() */
-int
-ioctl(int fd, unsigned long request, ...)
-{
- va_list ap;
- int rv;
-
- va_start(ap, request);
- rv = prog_ioctl(fd, request, va_arg(ap, void *));
- va_end(ap);
-
- return rv;
-}
-
int main(int argc, char **argv)
{
prop_dictionary_t dict;