MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / get_serial_number

Function get_serial_number

lib/usb/usbfinder.cc:14–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12 GREASEWEAZLE_ID, FLUXENGINE_ID, APPLESAUCE_ID};
13
14static const std::string get_serial_number(const libusbp::device& device)
15{
16 try
17 {
18 return device.get_serial_number();
19 }
20 catch (const libusbp::error& e)
21 {
22 if (e.has_code(LIBUSBP_ERROR_NO_SERIAL_NUMBER))
23 return "n/a";
24 throw;
25 }
26}
27
28std::vector<std::shared_ptr<CandidateDevice>> findUsbDevices()
29{

Callers 1

findUsbDevicesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected