Module Name: src Committed By: pooka Date: Mon Dec 13 13:32:26 UTC 2010
Modified Files: src/usr.bin/rump_allserver: rump_allserver.c Log Message: Handle -l which dlopens libs. This is more applicable to rump_server than rump_allserver. So if I do: golem> rump_server unix:///tmp/commsuck ==> golem> env RUMP_SERVER=unix:///tmp/commsuck rump.modstat NAME CLASS SOURCE REFS SIZE REQUIRES suser secmodel builtin 0 - - and: golem> rump_server -l librumpvfs.so unix:///tmp/commsuck ==> golem> env RUMP_SERVER=unix:///tmp/commsuck rump.modstat NAME CLASS SOURCE REFS SIZE REQUIRES suser secmodel builtin 0 - - wapbl vfs builtin 0 - - golem> rump_server -l librumpvfs.so -l librumpfs_ffs.so unix:///tmp/commsuck ==> golem> env RUMP_SERVER=unix:///tmp/commsuck rump.modstat NAME CLASS SOURCE REFS SIZE REQUIRES ffs vfs builtin 0 - - suser secmodel builtin 0 - - wapbl vfs builtin 0 - - Well, you get the picture... To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/rump_allserver/rump_allserver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/rump_allserver/rump_allserver.c diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.5 src/usr.bin/rump_allserver/rump_allserver.c:1.6 --- src/usr.bin/rump_allserver/rump_allserver.c:1.5 Sun Dec 12 18:33:44 2010 +++ src/usr.bin/rump_allserver/rump_allserver.c Mon Dec 13 13:32:25 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_allserver.c,v 1.5 2010/12/12 18:33:44 pooka Exp $ */ +/* $NetBSD: rump_allserver.c,v 1.6 2010/12/13 13:32:25 pooka Exp $ */ /*- * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: rump_allserver.c,v 1.5 2010/12/12 18:33:44 pooka Exp $"); +__RCSID("$NetBSD: rump_allserver.c,v 1.6 2010/12/13 13:32:25 pooka Exp $"); #endif /* !lint */ #include <sys/types.h> @@ -36,6 +36,7 @@ #include <rump/rump.h> #include <rump/rump_syscalls.h> +#include <dlfcn.h> #include <err.h> #include <errno.h> #include <semaphore.h> @@ -80,8 +81,13 @@ setprogname(argv[0]); sflag = 0; - while ((ch = getopt(argc, argv, "s")) != -1) { + while ((ch = getopt(argc, argv, "l:s")) != -1) { switch (ch) { + case 'l': + if (dlopen(optarg, RTLD_LAZY|RTLD_GLOBAL) == NULL) + errx(1, "dlopen %s failed: %s", + optarg, dlerror()); + break; case 's': sflag = 1; break;