diff --git a/client/main.c b/client/main.c index ba41184..f975b80 100644 --- a/client/main.c +++ b/client/main.c @@ -51,12 +51,14 @@ int main(int argc, char **argv) { fence_virt_args_t args; - char *my_options = "di:a:p:r:C:c:k:M:H:uo:t:?hV"; + const char *my_options; args_init(&args); if (!strcmp(basename(argv[0]), "fence_xvm")) { + my_options = "di:a:p:r:C:c:k:M:H:uo:t:?hV"; args.mode = MODE_MULTICAST; } else { + my_options = "dD:P:M:H:o:t:?hV"; args.mode = MODE_SERIAL; } diff --git a/client/options.c b/client/options.c index 09b625b..4e7111c 100644 --- a/client/options.c +++ b/client/options.c @@ -279,21 +279,6 @@ assign_version(fence_virt_args_t *args, struct arg_info *arg, char *value) } -static inline void -assign_noccs(fence_virt_args_t *args, struct arg_info *arg, char *value) -{ - args->flags |= F_NOCCS; -} - - -static inline void -assign_nocluster(fence_virt_args_t *args, struct arg_info *arg, char *value) -{ - args->flags |= F_NOCCS; - args->flags |= F_NOCLUSTER; -} - - static inline void assign_uri(fence_virt_args_t *args, struct arg_info *arg, char *value) { @@ -318,14 +303,14 @@ static struct arg_info _arg_info[] = { "Not user serviceable", NULL }, + { '\xff', NULL, "nodename", + "Not user serviceable", + NULL }, + { 'd', "-d", "debug", "Specify (CCS) / increment (command line) debug level", assign_debug }, - { 'f', "-f", NULL, - "Foreground mode (do not fork)", - assign_foreground }, - { 'i', "-i ", "ip_family", "IP Family ([auto], ipv4, ipv6)", assign_family }, @@ -359,7 +344,7 @@ static struct arg_info _arg_info[] = { assign_key }, { 'D', "-D ", "serial_device", - "Shared key file (default=" DEFAULT_SERIAL_DEVICE ")", + "Serial device (default=" DEFAULT_SERIAL_DEVICE ")", assign_device }, { 'P', "-P ", "serial_params", @@ -395,14 +380,6 @@ static struct arg_info _arg_info[] = { "Help (alternate)", assign_help }, - { 'X', "-X", NULL, - "Do not connect to CCS for configuration", - assign_noccs }, - - { 'L', "-L", NULL, - "Local mode only (no cluster; implies -X)", - assign_nocluster }, - { 'U', "-U", "uri", "URI for Hypervisor (default: auto detect)", assign_uri }, @@ -516,7 +493,7 @@ args_print(fence_virt_args_t *args) 1 = print fence-style stdin args + description */ void -args_usage(char *progname, char *optstr, int print_stdin) +args_usage(char *progname, const char *optstr, int print_stdin) { int x; struct arg_info *arg; @@ -606,7 +583,7 @@ eol: @param args Args structure to fill in. */ void -args_get_stdin(char *optstr, fence_virt_args_t *args) +args_get_stdin(const char *optstr, fence_virt_args_t *args) { char in[256]; int line = 0; @@ -651,7 +628,7 @@ args_get_stdin(char *optstr, fence_virt_args_t *args) @param args Args structure to fill in. */ void -args_get_getopt(int argc, char **argv, char *optstr, fence_virt_args_t *args) +args_get_getopt(int argc, char **argv, const char *optstr, fence_virt_args_t *args) { int opt; struct arg_info *arg; diff --git a/include/options.h b/include/options.h index 7d6fdd7..ffacfea 100644 --- a/include/options.h +++ b/include/options.h @@ -77,11 +77,11 @@ struct arg_info { void args_init(fence_virt_args_t *args); void args_finalize(fence_virt_args_t *args); -void args_get_getopt(int argc, char **argv, char *optstr, +void args_get_getopt(int argc, char **argv, const char *optstr, fence_virt_args_t *args); -void args_get_stdin(char *optstr, fence_virt_args_t *args); -void args_get_ccs(char *optstr, fence_virt_args_t *args); -void args_usage(char *progname, char *optstr, int print_stdin); +void args_get_stdin(const char *optstr, fence_virt_args_t *args); +void args_get_ccs(const char *optstr, fence_virt_args_t *args); +void args_usage(char *progname, const char *optstr, int print_stdin); void args_print(fence_virt_args_t *args); #endif diff --git a/man/fence_virt.8 b/man/fence_virt.8 index 43f698a..00c10e4 100644 --- a/man/fence_virt.8 +++ b/man/fence_virt.8 @@ -82,6 +82,17 @@ Treat 'domain' as UUID instead of domain name. .B -o . Fencing action (null, off, on, [reboot], or status) (Default Value: reboot) + +.TP +.B -D +. +Serial device (fence_virt mode). Default=/dev/ttyS1 + +.TP +.B -P +. +Serial parameters (fence_virt mode). Default=115200,8N1 + .TP .B -t @@ -175,5 +186,18 @@ Fencing action (null, off, on, [reboot], or status) (Default Value: reboot) . Fencing timeout (in seconds; default=30) (Default Value: 30) +.TP +.B serial_device +. +Serial device + +.TP +.B serial_params +. +Serial parameters + + + + .SH SEE ALSO