From owner-svn-src-all@FreeBSD.ORG Wed May 7 09:55:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2D8FCED; Wed, 7 May 2014 09:55:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 D13BC11A; Wed, 7 May 2014 09:55:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s479tmw5085312; Wed, 7 May 2014 09:55:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s479tlrA085306; Wed, 7 May 2014 09:55:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201405070955.s479tlrA085306@svn.freebsd.org> From: Marius Strobl Date: Wed, 7 May 2014 09:55:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265536 - in stable/10: sbin/gvinum sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 09:55:49 -0000 Author: marius Date: Wed May 7 09:55:47 2014 New Revision: 265536 URL: http://svnweb.freebsd.org/changeset/base/265536 Log: MFC: r265248 Allow GEOM_VINUM to be statically compiled into the kernel. Submitted by: gleb Modified: stable/10/sbin/gvinum/gvinum.c stable/10/sbin/gvinum/gvinum.h stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/conf/options Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/gvinum/gvinum.c ============================================================================== --- stable/10/sbin/gvinum/gvinum.c Wed May 7 09:15:46 2014 (r265535) +++ stable/10/sbin/gvinum/gvinum.c Wed May 7 09:55:47 2014 (r265536) @@ -95,8 +95,10 @@ main(int argc, char **argv) char buffer[BUFSIZ], *inputline, *token[GV_MAXARGS]; /* Load the module if necessary. */ - if (kldfind(GVINUMMOD) < 0 && kldload(GVINUMMOD) < 0) - err(1, GVINUMMOD ": Kernel module not available"); + if (modfind(GVINUMMOD) < 0) { + if (kldload(GVINUMKLD) < 0 && modfind(GVINUMMOD) < 0) + err(1, GVINUMKLD ": Kernel module not available"); + } /* Arguments given on the command line. */ if (argc > 1) { @@ -1204,9 +1206,10 @@ gvinum_stop(int argc, char **argv) { int err, fileid; - fileid = kldfind(GVINUMMOD); + fileid = kldfind(GVINUMKLD); if (fileid == -1) { - warn("cannot find " GVINUMMOD); + if (modfind(GVINUMMOD) < 0) + warn("cannot find " GVINUMKLD); return; } @@ -1216,7 +1219,7 @@ gvinum_stop(int argc, char **argv) * event thread will be free for the g_wither_geom() call from * gv_unload(). It's silly, but it works. */ - printf("unloading " GVINUMMOD " kernel module... "); + printf("unloading " GVINUMKLD " kernel module... "); fflush(stdout); if ((err = kldunload(fileid)) != 0 && (errno == EAGAIN)) { sleep(1); @@ -1224,7 +1227,7 @@ gvinum_stop(int argc, char **argv) } if (err != 0) { printf(" failed!\n"); - warn("cannot unload " GVINUMMOD); + warn("cannot unload " GVINUMKLD); return; } Modified: stable/10/sbin/gvinum/gvinum.h ============================================================================== --- stable/10/sbin/gvinum/gvinum.h Wed May 7 09:15:46 2014 (r265535) +++ stable/10/sbin/gvinum/gvinum.h Wed May 7 09:55:47 2014 (r265536) @@ -36,4 +36,5 @@ /* $FreeBSD$ */ -#define GVINUMMOD "geom_vinum" +#define GVINUMMOD "g_vinum" +#define GVINUMKLD "geom_vinum" Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Wed May 7 09:15:46 2014 (r265535) +++ stable/10/sys/conf/NOTES Wed May 7 09:55:47 2014 (r265536) @@ -176,6 +176,7 @@ options GEOM_SHSEC # Shared secret. options GEOM_STRIPE # Disk striping. options GEOM_SUNLABEL # Sun/Solaris partitioning options GEOM_UZIP # Read-only compressed disks +options GEOM_VINUM # Vinum logical volume manager options GEOM_VIRSTOR # Virtual storage. options GEOM_VOL # Volume names from UFS superblock options GEOM_ZERO # Performance testing helper. Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Wed May 7 09:15:46 2014 (r265535) +++ stable/10/sys/conf/files Wed May 7 09:55:47 2014 (r265536) @@ -2788,6 +2788,21 @@ contrib/xz-embedded/linux/lib/xz/xz_dec_ optional xz_embedded | geom_uncompress \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" geom/uzip/g_uzip.c optional geom_uzip +geom/vinum/geom_vinum.c optional geom_vinum +geom/vinum/geom_vinum_create.c optional geom_vinum +geom/vinum/geom_vinum_drive.c optional geom_vinum +geom/vinum/geom_vinum_plex.c optional geom_vinum +geom/vinum/geom_vinum_volume.c optional geom_vinum +geom/vinum/geom_vinum_subr.c optional geom_vinum +geom/vinum/geom_vinum_raid5.c optional geom_vinum +geom/vinum/geom_vinum_share.c optional geom_vinum +geom/vinum/geom_vinum_list.c optional geom_vinum +geom/vinum/geom_vinum_rm.c optional geom_vinum +geom/vinum/geom_vinum_init.c optional geom_vinum +geom/vinum/geom_vinum_state.c optional geom_vinum +geom/vinum/geom_vinum_rename.c optional geom_vinum +geom/vinum/geom_vinum_move.c optional geom_vinum +geom/vinum/geom_vinum_events.c optional geom_vinum geom/virstor/binstream.c optional geom_virstor geom/virstor/g_virstor.c optional geom_virstor geom/virstor/g_virstor_md.c optional geom_virstor Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Wed May 7 09:15:46 2014 (r265535) +++ stable/10/sys/conf/options Wed May 7 09:55:47 2014 (r265536) @@ -123,6 +123,7 @@ GEOM_STRIPE opt_geom.h GEOM_SUNLABEL opt_geom.h GEOM_UNCOMPRESS opt_geom.h GEOM_UZIP opt_geom.h +GEOM_VINUM opt_geom.h GEOM_VIRSTOR opt_geom.h GEOM_VOL opt_geom.h GEOM_ZERO opt_geom.h