mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-07-25 13:11:49 +00:00
add context to nfc_init(), nfc_exit(), nfc_open() and nfc_list_devices() functions.
This commit is contained in:
@@ -68,21 +68,21 @@ main (int argc, const char *argv[])
|
||||
errx (1, "usage: %s", argv[0]);
|
||||
}
|
||||
|
||||
nfc_init();
|
||||
nfc_init (NULL);
|
||||
|
||||
// Display libnfc version
|
||||
acLibnfcVersion = nfc_version ();
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
nfc_connstring connstrings[MAX_DEVICE_COUNT];
|
||||
size_t szFound = nfc_list_devices (connstrings, MAX_DEVICE_COUNT);
|
||||
size_t szFound = nfc_list_devices (NULL, connstrings, MAX_DEVICE_COUNT);
|
||||
|
||||
if (szFound == 0) {
|
||||
printf ("No NFC device found.\n");
|
||||
}
|
||||
|
||||
for (i = 0; i < szFound; i++) {
|
||||
pnd = nfc_open (connstrings[i]);
|
||||
pnd = nfc_open (NULL, connstrings[i]);
|
||||
|
||||
if (pnd == NULL) {
|
||||
ERR ("%s", "Unable to open NFC device.");
|
||||
|
||||
Reference in New Issue
Block a user