From owner-svn-src-head@freebsd.org Thu Jan 14 22:07:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84A6BA83F65; Thu, 14 Jan 2016 22:07:36 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55E211A49; Thu, 14 Jan 2016 22:07:36 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0EM7ZUY064659; Thu, 14 Jan 2016 22:07:35 GMT (envelope-from jmallett@FreeBSD.org) Received: (from jmallett@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0EM7Zvd064658; Thu, 14 Jan 2016 22:07:35 GMT (envelope-from jmallett@FreeBSD.org) Message-Id: <201601142207.u0EM7Zvd064658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmallett set sender to jmallett@FreeBSD.org using -f From: Juli Mallett Date: Thu, 14 Jan 2016 22:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294047 - head/sys/boot/userboot/test X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2016 22:07:36 -0000 Author: jmallett Date: Thu Jan 14 22:07:35 2016 New Revision: 294047 URL: https://svnweb.freebsd.org/changeset/base/294047 Log: Make it possible to specify the path to userboot.so with the -b flag. Reviewed by: neel Modified: head/sys/boot/userboot/test/test.c Modified: head/sys/boot/userboot/test/test.c ============================================================================== --- head/sys/boot/userboot/test/test.c Thu Jan 14 22:02:21 2016 (r294046) +++ head/sys/boot/userboot/test/test.c Thu Jan 14 22:07:35 2016 (r294047) @@ -414,7 +414,7 @@ void usage() { - printf("usage: [-d ] [-h \n"); + printf("usage: [-b ] [-d ] [-h \n"); exit(1); } @@ -425,9 +425,14 @@ main(int argc, char** argv) void (*func)(struct loader_callbacks *, void *, int, int); int opt; char *disk_image = NULL; + const char *userboot_obj = "/boot/userboot.so"; - while ((opt = getopt(argc, argv, "d:h:")) != -1) { + while ((opt = getopt(argc, argv, "b:d:h:")) != -1) { switch (opt) { + case 'b': + userboot_obj = optarg; + break; + case 'd': disk_image = optarg; break; @@ -441,8 +446,7 @@ main(int argc, char** argv) } } - h = dlopen("/boot/userboot.so", - RTLD_LOCAL); + h = dlopen(userboot_obj, RTLD_LOCAL); if (!h) { printf("%s\n", dlerror()); return (1);