1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-08-25 13:50:12 +03:00

core/device: Log when we can't retrieve SYSTEMD_ALIAS property

This commit is contained in:
Daan De Meyer
2022-05-07 15:56:34 +02:00
parent 2f82874558
commit c34511086f

View File

@ -598,8 +598,12 @@ static void device_process_new(Manager *m, sd_device *dev, const char *sysfs) {
}
/* Add additional units for all explicitly configured aliases */
if (sd_device_get_property_value(dev, "SYSTEMD_ALIAS", &alias) < 0)
r = sd_device_get_property_value(dev, "SYSTEMD_ALIAS", &alias);
if (r < 0) {
if (r != -ENOENT)
log_device_error_errno(dev, r, "Failed to get SYSTEMD_ALIAS property, ignoring: %m");
return;
}
for (;;) {
_cleanup_free_ char *word = NULL;