Skip to content

Commit

Permalink
chg: make version printing obey verbose flag
Browse files Browse the repository at this point in the history
  • Loading branch information
iceman1001 committed Jul 1, 2020
1 parent 0de5596 commit db081ed
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions utils/nfc-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ main(int argc, const char *argv[])
exit(EXIT_FAILURE);
}

// Display libnfc version
acLibnfcVersion = nfc_version();
printf("%s uses libnfc %s\n", argv[0], acLibnfcVersion);

// Get commandline options
for (arg = 1; arg < argc; arg++) {
if (0 == strcmp(argv[arg], "-h")) {
Expand All @@ -126,6 +122,13 @@ main(int argc, const char *argv[])
}
}

// Display libnfc version
if (verbose) {
acLibnfcVersion = nfc_version();
printf("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
}


/* Lazy way to open an NFC device */
#if 0
pnd = nfc_open(context, NULL);
Expand Down

0 comments on commit db081ed

Please sign in to comment.