mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
core/device: drop unused unit name generated from path
This commit is contained in:
parent
03a94b73c4
commit
42ebcebfef
@ -868,10 +868,13 @@ static void device_propagate_reload_by_sysfs(Manager *m, const char *sysfs) {
|
||||
}
|
||||
|
||||
static void device_remove_old_on_move(Manager *m, sd_device *dev) {
|
||||
_cleanup_free_ char *syspath_old = NULL, *e = NULL;
|
||||
_cleanup_free_ char *syspath_old = NULL;
|
||||
const char *devpath_old;
|
||||
int r;
|
||||
|
||||
assert(m);
|
||||
assert(dev);
|
||||
|
||||
r = sd_device_get_property_value(dev, "DEVPATH_OLD", &devpath_old);
|
||||
if (r < 0)
|
||||
return (void) log_device_debug_errno(dev, r, "Failed to get DEVPATH_OLD= property on 'move' uevent, ignoring: %m");
|
||||
@ -880,10 +883,6 @@ static void device_remove_old_on_move(Manager *m, sd_device *dev) {
|
||||
if (!syspath_old)
|
||||
return (void) log_oom();
|
||||
|
||||
r = unit_name_from_path(syspath_old, ".device", &e);
|
||||
if (r < 0)
|
||||
return (void) log_device_debug_errno(dev, r, "Failed to generate unit name from old device path, ignoring: %m");
|
||||
|
||||
device_update_found_by_sysfs(m, syspath_old, 0, DEVICE_FOUND_UDEV|DEVICE_FOUND_MOUNT|DEVICE_FOUND_SWAP);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user