MCPcopy Create free account
hub / github.com/USBGuard/usbguard / removeDevice

Method removeDevice

src/Library/DeviceManagerBase.cpp:82–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 }
81
82 std::shared_ptr<Device> DeviceManagerBase::removeDevice(const std::string& syspath)
83 {
84 /*
85 * FIXME: device map locking
86 */
87 if (!knownSysfsPath(syspath)) {
88 throw Exception("removeDevice", syspath, "unknown syspath, cannot remove device");
89 }
90
91 std::shared_ptr<Device> device = DeviceManager::removeDevice(getIDFromSysfsPath(syspath));
92 forgetSysfsPath(syspath);
93 return device;
94 }
95
96 uint32_t DeviceManagerBase::getIDFromSysfsPath(const std::string& sysfs_path) const
97 {

Callers

nothing calls this directly

Calls 1

ExceptionFunction · 0.85

Tested by

no test coverage detected