diff options
author | Werner Koch <wk@gnupg.org> | 2002-08-20 15:09:53 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2002-08-20 15:09:53 +0200 |
commit | e18e3875b75617a15cae196afe1434a5b37766ed (patch) | |
tree | 984de79cff99c339e6e70740edc2c38a364e333f /sm/gpgsm.c | |
parent | * DETAILS: Clarify that trust letters 'q' and '-' can be treated (diff) | |
download | gnupg2-e18e3875b75617a15cae196afe1434a5b37766ed.tar.xz gnupg2-e18e3875b75617a15cae196afe1434a5b37766ed.zip |
* gpgsm.c (main): Use the log file only in server mode.
* import.c (print_imported_summary): New.
(check_and_store): Update the counters, take new argument.
(import_one): Factored out core of gpgsm_import.
(gpgsm_import): Print counters.
(gpgsm_import_files): New.
* gpgsm.c (main): Use the new function for import.
Diffstat (limited to 'sm/gpgsm.c')
-rw-r--r-- | sm/gpgsm.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c index 28c4cca16..cffb17f5c 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -229,7 +229,6 @@ static ARGPARSE_OPTS opts[] = { { aLearnCard, "learn-card", 256 ,N_("register a smartcard")}, { aServer, "server", 256, N_("run in server mode")}, { oLogFile, "log-file" ,2, N_("use a log file for the server")}, - { 301, NULL, 0, N_("@\nOptions:\n ") }, @@ -1000,7 +999,7 @@ main ( int argc, char **argv) if (may_coredump && !opt.quiet) log_info (_("WARNING: program may create a core file!\n")); - if (logfile) + if (logfile && cmd == aServer) { log_set_file (logfile); log_set_prefix (NULL, 1|2|4); @@ -1227,13 +1226,7 @@ main ( int argc, char **argv) break; case aImport: - if (!argc) - gpgsm_import (&ctrl, 0); - else - { - for (; argc; argc--, argv++) - gpgsm_import (&ctrl, open_read (*argv)); - } + gpgsm_import_files (&ctrl, argc, argv, open_read); break; case aExport: |