removed debug printf

This commit is contained in:
Denis 2023-12-08 01:06:16 +01:00
parent 2f47bc1661
commit c1f7cdf373
No known key found for this signature in database
GPG key ID: DD9B63F805CF5C03

View file

@ -95,11 +95,6 @@ int dev_evdev_open(
continue; continue;
} }
for (int k = 0; k < (sizeof(open_fds) / sizeof(open_fds[0])); ++k) {
printf("open_fds[k: %d]=%d ", k, open_fds[k]);
}
printf("\n");
// check if that has been already opened // check if that has been already opened
// open_sysfs // open_sysfs
int skip = 0; int skip = 0;
@ -107,7 +102,6 @@ int dev_evdev_open(
if ((open_fds[o] != -1) && (open_fds[o] == fd)) { if ((open_fds[o] != -1) && (open_fds[o] == fd)) {
close(fd); close(fd);
skip = 1; skip = 1;
printf("Device %s already opened -- Skipping\n", path);
break; break;
} else if (open_fds[o] == -1) { } else if (open_fds[o] == -1) {
open_sysfs_idx = o; open_sysfs_idx = o;
@ -115,7 +109,6 @@ int dev_evdev_open(
} }
if ((skip) || (open_sysfs_idx == -1)) { if ((skip) || (open_sysfs_idx == -1)) {
printf("skip=%d open_sysfs_idx=%d\n", skip, open_sysfs_idx);
continue; continue;
} else { } else {
open_fds[open_sysfs_idx] = fd; open_fds[open_sysfs_idx] = fd;
@ -126,8 +119,6 @@ int dev_evdev_open(
open_fds[open_sysfs_idx] = -1; open_fds[open_sysfs_idx] = -1;
close(fd); close(fd);
continue; continue;
} else {
printf("Acquired evdev device %s: fd=%d", path, fd);
} }
// try to open the device // try to open the device
@ -136,6 +127,8 @@ int dev_evdev_open(
open_fds[open_sysfs_idx] = -1; open_fds[open_sysfs_idx] = -1;
close(fd); close(fd);
continue; continue;
} else {
printf("Acquired evdev device %s: fd=%d\n", path, fd);
} }
// the device has been found // the device has been found