diff --git a/dongle.c b/dongle.c index a931f06b82de473bbb37fe8a50c4d0a91b310ab2..24717aa855e89103b9a36f05b479c9826979e820 100644 --- a/dongle.c +++ b/dongle.c @@ -395,8 +395,7 @@ int get_devices_from_path(char *input_path) struct stat st; struct device *dev; int rv; - printf("initial input_path %s\n", input_path); - //strncpy(usb_path, "/sys/bus/usb/devices/", PATH_MAX); + dir = opendir(input_path); if (!dir) { perror("opendir"); @@ -409,7 +408,7 @@ int get_devices_from_path(char *input_path) if (strstr(de->d_name, ":") || strstr(de->d_name, "usb")) continue; snprintf(product_path, PATH_MAX, "%s/product", input_path); - printf("stat path %s\n", product_path); + memset(&st, 0, sizeof(st)); rv = stat(product_path, &st); if (rv < 0) {