|
|
@ -36,10 +36,10 @@ |
|
|
|
#include "logging.h" |
|
|
|
#include "logging.h" |
|
|
|
#include "miner.h" |
|
|
|
#include "miner.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_LIBUDEV |
|
|
|
char |
|
|
|
char |
|
|
|
serial_autodetect_udev(detectone_func_t detectone, const char*prodname) |
|
|
|
serial_autodetect_udev(detectone_func_t detectone, const char*prodname) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#ifdef HAVE_LIBUDEV |
|
|
|
|
|
|
|
if (total_devices == MAX_DEVICES) |
|
|
|
if (total_devices == MAX_DEVICES) |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
|
@ -72,10 +72,14 @@ serial_autodetect_udev(detectone_func_t detectone, const char*prodname) |
|
|
|
udev_unref(udev); |
|
|
|
udev_unref(udev); |
|
|
|
|
|
|
|
|
|
|
|
return found; |
|
|
|
return found; |
|
|
|
|
|
|
|
} |
|
|
|
#else |
|
|
|
#else |
|
|
|
|
|
|
|
char |
|
|
|
|
|
|
|
serial_autodetect_udev(__maybe_unused detectone_func_t detectone, __maybe_unused const char*prodname) |
|
|
|
|
|
|
|
{ |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
char |
|
|
|
char |
|
|
|
serial_autodetect_devserial(detectone_func_t detectone, const char*prodname) |
|
|
|
serial_autodetect_devserial(detectone_func_t detectone, const char*prodname) |
|
|
@ -115,7 +119,7 @@ serial_autodetect_devserial(detectone_func_t detectone, const char*prodname) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char |
|
|
|
char |
|
|
|
_serial_detect(const char*dnamec, size_t dnamel, detectone_func_t detectone, autoscan_func_t autoscan, bool force_autoscan) |
|
|
|
_serial_detect(const char*dnamec, size_t dnamel, detectone_func_t detectone, autoscan_func_t autoscan, bool forceauto) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (total_devices == MAX_DEVICES) |
|
|
|
if (total_devices == MAX_DEVICES) |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
@ -123,7 +127,6 @@ _serial_detect(const char*dnamec, size_t dnamel, detectone_func_t detectone, aut |
|
|
|
struct string_elist *iter, *tmp; |
|
|
|
struct string_elist *iter, *tmp; |
|
|
|
const char*s; |
|
|
|
const char*s; |
|
|
|
bool inhibitauto = false; |
|
|
|
bool inhibitauto = false; |
|
|
|
bool forceauto = false; |
|
|
|
|
|
|
|
char found = 0; |
|
|
|
char found = 0; |
|
|
|
|
|
|
|
|
|
|
|
list_for_each_entry_safe(iter, tmp, &scan_devices, list) { |
|
|
|
list_for_each_entry_safe(iter, tmp, &scan_devices, list) { |
|
|
|