mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-05 09:14:03 +00:00
Allow GEOM_VINUM to be statically compiled into the kernel.
Submitted by: gleb MFC after: 3 days
This commit is contained in:
parent
f2b1eaec33
commit
02e17f0b93
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265248
@ -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) {
|
||||
@ -1207,9 +1209,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;
|
||||
}
|
||||
|
||||
@ -1219,7 +1222,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);
|
||||
@ -1227,7 +1230,7 @@ gvinum_stop(int argc, char **argv)
|
||||
}
|
||||
if (err != 0) {
|
||||
printf(" failed!\n");
|
||||
warn("cannot unload " GVINUMMOD);
|
||||
warn("cannot unload " GVINUMKLD);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -36,4 +36,5 @@
|
||||
|
||||
/* $FreeBSD$ */
|
||||
|
||||
#define GVINUMMOD "geom_vinum"
|
||||
#define GVINUMMOD "g_vinum"
|
||||
#define GVINUMKLD "geom_vinum"
|
||||
|
@ -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.
|
||||
|
@ -2770,6 +2770,21 @@ contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c \
|
||||
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
|
||||
|
@ -125,6 +125,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
|
||||
|
Loading…
Reference in New Issue
Block a user