check result of nfc_initiator_init() function in examples/ and utils/

This commit is contained in:
Audrey Diacre 2012-01-05 10:33:50 +00:00
parent 331234713d
commit 5a1f0c2115
11 changed files with 45 additions and 11 deletions

View file

@ -26,7 +26,10 @@ main (int argc, const char *argv[])
return EXIT_FAILURE;
}
// Set connected NFC device to initiator mode
nfc_initiator_init (pnd);
if (nfc_initiator_init (pnd) < 0) {
nfc_perror (pnd, "nfc_initiator_init");
exit (EXIT_FAILURE);
}
printf ("Connected to NFC reader: %s\n", nfc_device_get_name (pnd));