summaryrefslogtreecommitdiffstats
path: root/src/core/device.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-06-02 15:34:03 +0200
committerLennart Poettering <lennart@poettering.net>2021-06-03 15:01:05 +0200
commit68695ce4d688022ff5b86a13155bd8aa8ec91d55 (patch)
treebcf333e56e1e391ee7ec8f65709032a8d61aa4b6 /src/core/device.c
parentpid1: properly propagate errors from device_setup_unit() (diff)
downloadsystemd-68695ce4d688022ff5b86a13155bd8aa8ec91d55.tar.xz
systemd-68695ce4d688022ff5b86a13155bd8aa8ec91d55.zip
pid1: eat up errors in device_update_found_by_name()
We eat up all errors in the caller already, and rightly so.
Diffstat (limited to 'src/core/device.c')
-rw-r--r--src/core/device.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/device.c b/src/core/device.c
index 62a987dea7..cceeb1fe7e 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -721,7 +721,7 @@ static void device_update_found_by_sysfs(Manager *m, const char *sysfs, DeviceFo
device_update_found_one(d, found, mask);
}
-static int device_update_found_by_name(Manager *m, const char *path, DeviceFound found, DeviceFound mask) {
+static void device_update_found_by_name(Manager *m, const char *path, DeviceFound found, DeviceFound mask) {
_cleanup_free_ char *e = NULL;
Unit *u;
int r;
@@ -730,18 +730,17 @@ static int device_update_found_by_name(Manager *m, const char *path, DeviceFound
assert(path);
if (mask == 0)
- return 0;
+ return;
r = unit_name_from_path(path, ".device", &e);
if (r < 0)
- return log_error_errno(r, "Failed to generate unit name from device path: %m");
+ return (void) log_debug_errno(r, "Failed to generate unit name from device path, ignoring: %m");
u = manager_get_unit(m, e);
if (!u)
- return 0;
+ return;
device_update_found_one(DEVICE(u), found, mask);
- return 0;
}
static bool device_is_ready(sd_device *dev) {