mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 09:58:54 +00:00
Fix USB class/subclass IDs on darwin (#4363)
This commit is contained in:
parent
81751e5526
commit
2e72f9f20a
@ -51,6 +51,9 @@ void genUSBDevice(const io_service_t& device, QueryData& results) {
|
||||
r["vendor_id"] = getIOKitProperty(details, "idVendor");
|
||||
r["version"] = decodeUSBBCD(getNumIOKitProperty(details, "bcdDevice"));
|
||||
|
||||
r["class"] = std::to_string(getNumIOKitProperty(details, "bDeviceClass") & 0xFF);
|
||||
r["subclass"] = std::to_string(getNumIOKitProperty(details, "bDeviceSubClass") & 0xFF);
|
||||
|
||||
r["serial"] = getIOKitProperty(details, "USB Serial Number");
|
||||
if (r.at("serial").size() == 0) {
|
||||
r["serial"] = getIOKitProperty(details, "iSerialNumber");
|
||||
|
Loading…
Reference in New Issue
Block a user