svn commit: r265536 - in stable/10: sbin/gvinum sys/conf
Marius Strobl
marius at FreeBSD.org
Wed May 7 09:55:49 UTC 2014
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
More information about the svn-src-stable
mailing list