/* Remove this unit from the chain of devices which share the
* same sysfs path. */
first = hashmap_get(UNIT(d)->manager->devices_by_sysfs, d->sysfs);
/* Remove this unit from the chain of devices which share the
* same sysfs path. */
first = hashmap_get(UNIT(d)->manager->devices_by_sysfs, d->sysfs);
if (first)
hashmap_remove_and_replace(UNIT(d)->manager->devices_by_sysfs, d->sysfs, first->sysfs, first);
if (first)
hashmap_remove_and_replace(UNIT(d)->manager->devices_by_sysfs, d->sysfs, first->sysfs, first);
* indefinitely for plugged in devices, something which cannot
* happen for the other units since their operations time out
* anyway. */
* indefinitely for plugged in devices, something which cannot
* happen for the other units since their operations time out
* anyway. */
goto fail;
}
if ((model = udev_device_get_property_value(dev, "ID_MODEL_FROM_DATABASE")) ||
(model = udev_device_get_property_value(dev, "ID_MODEL"))) {
goto fail;
}
if ((model = udev_device_get_property_value(dev, "ID_MODEL_FROM_DATABASE")) ||
(model = udev_device_get_property_value(dev, "ID_MODEL"))) {
size_t l;
FOREACH_WORD_QUOTED(w, l, alias, state) {
size_t l;
FOREACH_WORD_QUOTED(w, l, alias, state) {
device_update_unit(m, dev, e, false);
device_update_unit(m, dev, e, false);
size_t l;
FOREACH_WORD_QUOTED(w, l, wants, state) {
size_t l;
FOREACH_WORD_QUOTED(w, l, wants, state) {
r = unit_add_dependency_by_name(u, UNIT_WANTS, n, NULL, true);
r = unit_add_dependency_by_name(u, UNIT_WANTS, n, NULL, true);