Revert r4191 "Fix logic in pkcs15-tool/pkcs15-init -v"

This reverts commit a61f619296.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4206 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
martin 2010-04-02 13:11:07 +00:00
parent 2820f78e09
commit 379519e84e
2 changed files with 6 additions and 12 deletions

View File

@ -344,7 +344,7 @@ static unsigned int opt_type = 0;
static int ignore_cmdline_pins = 0;
static struct secret opt_secrets[MAX_SECRETS];
static unsigned int opt_secret_count;
static int verbose = -1;
static int verbose = 0;
static struct sc_pkcs15init_callbacks callbacks = {
get_pin_callback, /* get_pin() */
@ -562,10 +562,7 @@ open_reader_and_card(char *reader)
util_error("Failed to establish context: %s\n", sc_strerror(r));
return 0;
}
if (verbose > -1)
ctx->debug = verbose;
else
verbose = 0;
ctx->debug = verbose;
if (verbose > 1) {
ctx->debug_file = stderr;
@ -2520,7 +2517,7 @@ handle_option(const struct option *opt)
opt_type = parse_objects(optarg, ACTION_CHANGE_ATTRIBUTES);
break;
case 'v':
verbose += (verbose == -1 ) ? 2 : 1;
verbose++;
break;
case 'f':
opt_format = optarg;

View File

@ -55,7 +55,7 @@ static u8 * opt_newpin = NULL;
static u8 * opt_pin = NULL;
static u8 * opt_puk = NULL;
static int verbose = -1;
static int verbose = 0;
enum {
OPT_CHANGE_PIN = 0x100,
@ -1602,7 +1602,7 @@ int main(int argc, char * const argv[])
opt_outfile = optarg;
break;
case 'v':
verbose += (verbose == -1) ? 2 : 1;
verbose++;
break;
case 'a':
opt_auth_id = optarg;
@ -1627,10 +1627,7 @@ int main(int argc, char * const argv[])
fprintf(stderr, "Failed to establish context: %s\n", sc_strerror(r));
return 1;
}
if (verbose > -1)
ctx->debug = verbose;
else
verbose = 0;
ctx->debug = verbose;
err = util_connect_card(ctx, &card, opt_reader, opt_wait, verbose);
if (err)