diff options
author | Werner Koch <[email protected]> | 2014-04-08 13:55:51 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-04-08 13:57:14 +0000 |
commit | b4cf4686f7349be9558217f20e51157398cd88a0 (patch) | |
tree | ed04e4493fc4a55697cd83a189592e0522f0ccd1 /tools/gpgconf.c | |
parent | scd: Silent compiler warnings about unused variables. (diff) | |
download | gnupg-b4cf4686f7349be9558217f20e51157398cd88a0.tar.gz gnupg-b4cf4686f7349be9558217f20e51157398cd88a0.zip |
gpgconf: Add command --launch.
* tools/gpgconf.c: Add command --launch.
* tools/gpgconf-comp.c (gc_component_launch): New.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'tools/gpgconf.c')
-rw-r--r-- | tools/gpgconf.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c index fbce6d371..96313f617 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -51,6 +51,7 @@ enum cmd_and_opt_values aListConfig, aCheckConfig, aListDirs, + aLaunch, aKill, aReload }; @@ -75,6 +76,7 @@ static ARGPARSE_OPTS opts[] = { aCheckConfig, "check-config", 256, N_("check global configuration file") }, { aReload, "reload", 256, N_("reload all or a given component")}, + { aLaunch, "launch", 256, N_("launch a given component")}, { aKill, "kill", 256, N_("kill a given component")}, { 301, NULL, 0, N_("@\nOptions:\n ") }, @@ -184,6 +186,7 @@ main (int argc, char **argv) case aListConfig: case aCheckConfig: case aReload: + case aLaunch: case aKill: cmd = pargs.r_opt; break; @@ -255,6 +258,7 @@ main (int argc, char **argv) } break; + case aLaunch: case aKill: if (!fname) { @@ -266,7 +270,7 @@ main (int argc, char **argv) } else { - /* Kill a given component. */ + /* Launch/Kill a given component. */ int idx; idx = gc_component_find (fname); @@ -276,10 +280,10 @@ main (int argc, char **argv) es_putc ('\n', es_stderr); exit (1); } + else if (cmd == aLaunch) + gc_component_launch (idx); else - { - gc_component_kill (idx); - } + gc_component_kill (idx); } break; |