| 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 | { |
nothing calls this directly
no test coverage detected