From: Jérémie Galarneau Date: Sun, 26 Jul 2015 20:13:18 +0000 (-0400) Subject: Use popt "required_argument" and "no_argument" constants X-Git-Tag: v2.7.0-rc2~170 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4731a947b39918bbd7280e2826cad06b02ff71c0;p=lttng-tools.git Use popt "required_argument" and "no_argument" constants Use popt's provided constants for the "has_arg" field of long options instead of hardcoding 0 and 1 everywhere. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 2b99bbc99..196aa1371 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -133,34 +133,34 @@ static struct consumer_data ustconsumer32_data = { /* Command line options */ static const struct option long_options[] = { - { "client-sock", 1, 0, 'c' }, - { "apps-sock", 1, 0, 'a' }, - { "kconsumerd-cmd-sock", 1, 0, '\0' }, - { "kconsumerd-err-sock", 1, 0, '\0' }, - { "ustconsumerd32-cmd-sock", 1, 0, '\0' }, - { "ustconsumerd32-err-sock", 1, 0, '\0' }, - { "ustconsumerd64-cmd-sock", 1, 0, '\0' }, - { "ustconsumerd64-err-sock", 1, 0, '\0' }, - { "consumerd32-path", 1, 0, '\0' }, - { "consumerd32-libdir", 1, 0, '\0' }, - { "consumerd64-path", 1, 0, '\0' }, - { "consumerd64-libdir", 1, 0, '\0' }, - { "daemonize", 0, 0, 'd' }, - { "background", 0, 0, 'b' }, - { "sig-parent", 0, 0, 'S' }, - { "help", 0, 0, 'h' }, - { "group", 1, 0, 'g' }, - { "version", 0, 0, 'V' }, - { "quiet", 0, 0, 'q' }, - { "verbose", 0, 0, 'v' }, - { "verbose-consumer", 0, 0, '\0' }, - { "no-kernel", 0, 0, '\0' }, - { "pidfile", 1, 0, 'p' }, - { "agent-tcp-port", 1, 0, '\0' }, - { "config", 1, 0, 'f' }, - { "load", 1, 0, 'l' }, - { "kmod-probes", 1, 0, '\0' }, - { "extra-kmod-probes", 1, 0, '\0' }, + { "client-sock", required_argument, 0, 'c' }, + { "apps-sock", required_argument, 0, 'a' }, + { "kconsumerd-cmd-sock", required_argument, 0, '\0' }, + { "kconsumerd-err-sock", required_argument, 0, '\0' }, + { "ustconsumerd32-cmd-sock", required_argument, 0, '\0' }, + { "ustconsumerd32-err-sock", required_argument, 0, '\0' }, + { "ustconsumerd64-cmd-sock", required_argument, 0, '\0' }, + { "ustconsumerd64-err-sock", required_argument, 0, '\0' }, + { "consumerd32-path", required_argument, 0, '\0' }, + { "consumerd32-libdir", required_argument, 0, '\0' }, + { "consumerd64-path", required_argument, 0, '\0' }, + { "consumerd64-libdir", required_argument, 0, '\0' }, + { "daemonize", no_argument, 0, 'd' }, + { "background", no_argument, 0, 'b' }, + { "sig-parent", no_argument, 0, 'S' }, + { "help", no_argument, 0, 'h' }, + { "group", required_argument, 0, 'g' }, + { "version", no_argument, 0, 'V' }, + { "quiet", no_argument, 0, 'q' }, + { "verbose", no_argument, 0, 'v' }, + { "verbose-consumer", no_argument, 0, '\0' }, + { "no-kernel", no_argument, 0, '\0' }, + { "pidfile", required_argument, 0, 'p' }, + { "agent-tcp-port", required_argument, 0, '\0' }, + { "config", required_argument, 0, 'f' }, + { "load", required_argument, 0, 'l' }, + { "kmod-probes", required_argument, 0, '\0' }, + { "extra-kmod-probes", required_argument, 0, '\0' }, { NULL, 0, 0, 0 } };