diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-10-04 08:29:25 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-10-04 13:29:41 +0200 |
commit | e6766c538a9f5c25f24d7f55219311dd284b6681 (patch) | |
tree | a5de9cc953ef46d4f8060fdcbf3b20877c7aadf5 /src/udev | |
parent | Update NEWS (diff) | |
download | systemd-e6766c538a9f5c25f24d7f55219311dd284b6681.tar.xz systemd-e6766c538a9f5c25f24d7f55219311dd284b6681.zip |
udev-builtin-net_id: reading phys_port_name may be refused with EOPNOTSUPP
If reading the sysattr failed with such error, the whole operation in
net_id builtin command will fail, and the interface will not be renamed.
Fixes a bug introduced by 5bbcfbaa11a92732f9bbc8d5f77e9311e6ac3d56.
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udev-builtin-net_id.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index 28ff32496a..13ef700b1e 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -1082,9 +1082,7 @@ static int get_link_info(sd_device *dev, LinkInfo *info) { if (r < 0 && r != -ENOENT) return r; - r = sd_device_get_sysattr_value(dev, "phys_port_name", &info->phys_port_name); - if (r < 0 && r != -ENOENT) - return r; + (void) sd_device_get_sysattr_value(dev, "phys_port_name", &info->phys_port_name); r = sd_device_get_sysattr_value(dev, "address", &s); if (r < 0 && r != -ENOENT) |