From f0a3a3f8c4f39dfacf2d370bd23b27cd5b3358bf Mon Sep 17 00:00:00 2001 From: laforge Date: Fri, 1 Dec 2006 13:29:00 +0000 Subject: - add size detection for mifare classic / ultralight - add possibility to obtain ATQA via getopt - fix default -EINVAL return of tcl getopt git-svn-id: https://svn.gnumonks.org/trunk/librfid@1930 e0336214-984f-0b4b-a45f-81c69e1f0ede --- utils/librfid-tool.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'utils') diff --git a/utils/librfid-tool.c b/utils/librfid-tool.c index 37efadc..be6e843 100644 --- a/utils/librfid-tool.c +++ b/utils/librfid-tool.c @@ -260,6 +260,9 @@ static int l2_by_name(const char *name) static void do_scan(void) { int rc; + unsigned int size; + unsigned int size_len = sizeof(size); + printf("scanning for RFID token...\n"); rc = rfid_scan(rh, &l2h, &ph); if (rc >= 2) { @@ -272,6 +275,10 @@ static void do_scan(void) } if (rc >= 3) { printf("Protocol success (%s)\n", rfid_protocol_name(ph)); + + if (rfid_protocol_getopt(ph, RFID_OPT_PROTO_SIZE, + &size, &size_len) == 0) + printf("Size: %u bytes\n", size); } } -- cgit v1.2.3