nfc_abort_command() function returns now 0 on success and libnfc error code on failure and fix some warnings.

This commit is contained in:
Audrey Diacre 2012-01-05 14:49:02 +00:00
parent 8b07a5f4c7
commit c80ebdca25
10 changed files with 14 additions and 14 deletions

View file

@ -54,7 +54,7 @@ nfc_initiator_mifare_cmd (nfc_device *pnd, const mifare_cmd mc, const uint8_t ui
size_t szRx = sizeof(abtRx);
size_t szParamLen;
uint8_t abtCmd[265];
bool bEasyFraming;
//bool bEasyFraming;
abtCmd[0] = mc; // The MIFARE Classic command
abtCmd[1] = ui8Block; // The block address (1K=0x00..0x39, 4K=0x00..0xff)

View file

@ -60,7 +60,7 @@
static nfc_device *pnd;
void
print_usage (char* progname)
print_usage (const char* progname)
{
printf ("usage: %s [-v]\n", progname);
printf (" -v\t verbose display\n");

View file

@ -577,7 +577,7 @@ main (int argc, const char *argv[])
uint8_t fileUid[4];
memcpy (fileUid, mtKeys.amb[0].mbm.abtUID, 4);
// Compare if key dump UID is the same as the current tag UID, at least for the first 4 bytes
if (memcmp (nt.nti.nai.abtUid, fileUid, 4) != 0) {
if (memcmp (pbtUID, fileUid, 4) != 0) {
printf ("Expected MIFARE Classic card with UID starting as: %02x%02x%02x%02x\n",
fileUid[0], fileUid[1], fileUid[2], fileUid[3]);
}