mirror of
https://github.com/systemd/systemd.git
synced 2025-03-21 02:50:18 +03:00
udev-event: set INTERFACE/INTERFACE_OLD property on rename only when the device is a network interface
This does not change any behavior, as currently udevd only supports renaming for network interfaces. Closes #26156.
This commit is contained in:
parent
e3bc8d3449
commit
4352457a96
@ -96,11 +96,8 @@ static int device_rename(sd_device *device, const char *name) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = sd_device_get_property_value(device, "INTERFACE", &s);
|
||||
if (r == -ENOENT)
|
||||
if (device_get_ifname(device, &s) < 0)
|
||||
return 0;
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
/* like DEVPATH_OLD, INTERFACE_OLD is not saved to the db, but only stays around for the current event */
|
||||
r = device_add_property_internal(device, "INTERFACE_OLD", s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user