diff options
author | pjd <pjd@FreeBSD.org> | 2010-09-13 08:56:07 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2010-09-13 08:56:07 +0000 |
commit | 6f96b7c2288e6972fad73b42080d841231294cae (patch) | |
tree | 4675ae936d21184a722c23122b0256934f486ced /sbin/geom/class/mirror | |
parent | ab04d6fe3f3cad0bec4d257b1064f6959ac9d358 (diff) | |
download | FreeBSD-src-6f96b7c2288e6972fad73b42080d841231294cae.zip FreeBSD-src-6f96b7c2288e6972fad73b42080d841231294cae.tar.gz |
- Allow to specify value as const pointers.
- Make optional string values always an empty string.
Diffstat (limited to 'sbin/geom/class/mirror')
-rw-r--r-- | sbin/geom/class/mirror/geom_mirror.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/geom/class/mirror/geom_mirror.c b/sbin/geom/class/mirror/geom_mirror.c index cf15c60..de51fb1 100644 --- a/sbin/geom/class/mirror/geom_mirror.c +++ b/sbin/geom/class/mirror/geom_mirror.c @@ -44,7 +44,8 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_MIRROR_VERSION; -static char label_balance[] = "load", configure_balance[] = "none"; +#define GMIRROR_BALANCE "load" + static intmax_t label_slice = 4096, configure_slice = -1; static intmax_t insert_priority = 0, configure_priority = -1; @@ -64,7 +65,7 @@ struct g_command class_commands[] = { { "configure", G_FLAG_VERBOSE, NULL, { { 'a', "autosync", NULL, G_TYPE_BOOL }, - { 'b', "balance", configure_balance, G_TYPE_STRING }, + { 'b', "balance", "", G_TYPE_STRING }, { 'd', "dynamic", NULL, G_TYPE_BOOL }, { 'f', "failsync", NULL, G_TYPE_BOOL }, { 'F', "nofailsync", NULL, G_TYPE_BOOL }, @@ -88,7 +89,7 @@ struct g_command class_commands[] = { }, { "label", G_FLAG_VERBOSE, mirror_main, { - { 'b', "balance", label_balance, G_TYPE_STRING }, + { 'b', "balance", GMIRROR_BALANCE, G_TYPE_STRING }, { 'F', "nofailsync", NULL, G_TYPE_BOOL }, { 'h', "hardcode", NULL, G_TYPE_BOOL }, { 'n', "noautosync", NULL, G_TYPE_BOOL }, |