summaryrefslogtreecommitdiffstats
path: root/src/udev
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-06-02 12:26:29 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-06-02 14:00:45 +0200
commit7b80829575e14c75d4e016561e0ce749aeb41e51 (patch)
treed67cb92d268a987886d57f48eb56cb310273c169 /src/udev
parentudev: check that passed symbolic link path starts with /dev (diff)
downloadsystemd-7b80829575e14c75d4e016561e0ce749aeb41e51.tar.xz
systemd-7b80829575e14c75d4e016561e0ce749aeb41e51.zip
udev: upgrade log level about failure in updating devlinks
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udev-node.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c
index 422f6028ad..a6abaa1a9d 100644
--- a/src/udev/udev-node.c
+++ b/src/udev/udev-node.c
@@ -344,7 +344,11 @@ int udev_node_update_old_links(sd_device *dev, sd_device *dev_old) {
log_device_debug(dev, "Updating old name, '%s' no longer belonging to '%s'",
name, devpath);
- link_update(dev, name, false);
+ r = link_update(dev, name, false);
+ if (r < 0)
+ log_device_warning_errno(dev, r,
+ "Failed to update device symlink '%s', ignoring: %m",
+ name);
}
return 0;
@@ -535,7 +539,9 @@ int udev_node_add(sd_device *dev, bool apply,
FOREACH_DEVICE_DEVLINK(dev, devlink) {
r = link_update(dev, devlink, true);
if (r < 0)
- log_device_info_errno(dev, r, "Failed to update device symlinks: %m");
+ log_device_warning_errno(dev, r,
+ "Failed to update device symlink '%s', ignoring: %m",
+ devlink);
}
return 0;
@@ -552,7 +558,9 @@ int udev_node_remove(sd_device *dev) {
FOREACH_DEVICE_DEVLINK(dev, devlink) {
r = link_update(dev, devlink, false);
if (r < 0)
- log_device_info_errno(dev, r, "Failed to update device symlinks: %m");
+ log_device_warning_errno(dev, r,
+ "Failed to update device symlink '%s', ignoring: %m",
+ devlink);
}
r = xsprintf_dev_num_path_from_sd_device(dev, &filename);