verbose option back for nfc-list, and newly implemented in nfc-poll

This commit is contained in:
Romuald Conty 2012-01-04 21:29:43 +00:00
parent af22d34d57
commit 125553c72e
4 changed files with 44 additions and 8 deletions

View file

@ -18,7 +18,7 @@ This tool displays all available information at selection time.
.SH OPTIONS
.TP
.B \-v, \-\-verbose
.B \-v
Tells
.I
nfc-list

View file

@ -59,6 +59,13 @@
static nfc_device *pnd;
void
print_usage (char* progname)
{
printf ("usage: %s [-v]\n", progname);
printf (" -v\t verbose display\n");
}
int
main (int argc, const char *argv[])
{
@ -71,6 +78,14 @@ main (int argc, const char *argv[])
// Display libnfc version
acLibnfcVersion = nfc_version ();
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
if (argc != 1) {
if ((argc == 2) && (0 == strcmp ("-v", argv[1]))) {
verbose = true;
} else {
print_usage (argv[0]);
exit (EXIT_FAILURE);
}
}
#ifdef HAVE_LIBUSB
# ifdef DEBUG