1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-05 09:17:44 +03:00

shared/udev-util: say "ignoring device", not "ignoring"

The short form sounds like we're ignoring the error.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-08-23 14:18:41 +02:00
parent 712e0b4792
commit 406fbeca32

View File

@ -683,7 +683,7 @@ int on_ac_power(void) {
r = sd_device_get_sysattr_value(d, "type", &val); r = sd_device_get_sysattr_value(d, "type", &val);
if (r < 0) { if (r < 0) {
log_device_debug_errno(d, r, "Failed to read 'type' sysfs attribute, ignoring: %m"); log_device_debug_errno(d, r, "Failed to read 'type' sysfs attribute, ignoring device: %m");
continue; continue;
} }
@ -693,7 +693,7 @@ int on_ac_power(void) {
* https://docs.kernel.org/admin-guide/abi-testing.html#abi-file-testing-sysfs-class-power */ * https://docs.kernel.org/admin-guide/abi-testing.html#abi-file-testing-sysfs-class-power */
if (streq(val, "Battery")) { if (streq(val, "Battery")) {
found_battery = true; found_battery = true;
log_device_debug(d, "The power supply is battery, ignoring."); log_device_debug(d, "The power supply is battery, ignoring device.");
continue; continue;
} }
@ -702,22 +702,22 @@ int on_ac_power(void) {
r = device_is_power_sink(d); r = device_is_power_sink(d);
if (r <= 0) { if (r <= 0) {
if (r < 0) if (r < 0)
log_device_debug_errno(d, r, "Failed to determine the current power role, ignoring: %m"); log_device_debug_errno(d, r, "Failed to determine the current power role, ignoring device: %m");
else else
log_device_debug(d, "USB power supply is in source mode, ignoring."); log_device_debug(d, "USB power supply is in source mode, ignoring device.");
continue; continue;
} }
} }
r = sd_device_get_sysattr_value(d, "online", &val); r = sd_device_get_sysattr_value(d, "online", &val);
if (r < 0) { if (r < 0) {
log_device_debug_errno(d, r, "Failed to read 'online' sysfs attribute, ignoring: %m"); log_device_debug_errno(d, r, "Failed to read 'online' sysfs attribute, ignoring device: %m");
continue; continue;
} }
r = safe_atou(val, &v); r = safe_atou(val, &v);
if (r < 0) { if (r < 0) {
log_device_debug_errno(d, r, "Failed to parse 'online' attribute, ignoring: %m"); log_device_debug_errno(d, r, "Failed to parse 'online' attribute, ignoring device: %m");
continue; continue;
} }