summaryrefslogtreecommitdiffstats
path: root/src/udev/udev-builtin-net_id.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-04-30 15:54:12 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-04-30 21:41:06 +0200
commit4e494e6aace40a356e646414b48f32c49ec7bbd8 (patch)
tree72b338f5285d0078c24446f301302e2ba6d8dab8 /src/udev/udev-builtin-net_id.c
parentbuild-path: fix SIGSEGV on RISC-V and MIPS (diff)
downloadsystemd-4e494e6aace40a356e646414b48f32c49ec7bbd8.tar.xz
systemd-4e494e6aace40a356e646414b48f32c49ec7bbd8.zip
tree-wise: several cleanups for logging
- drop unnecessary SYNTHETIC_ERRNO() when the logger does not propagate error code, - drop unnecessary '%m' in error message when the error code is specified with SYNTHETIC_ERRNO(), - add missing full stop at the end of log message, - use RET_GATHER(), - add missing ", ignoring.", - upeercase the first letter, etc., etc...
Diffstat (limited to 'src/udev/udev-builtin-net_id.c')
-rw-r--r--src/udev/udev-builtin-net_id.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
index ac4541edd7..384a1f31cb 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -814,7 +814,7 @@ static int names_devicetree(sd_device *dev, const char *prefix, EventMode mode)
ofnode_path = path_startswith(ofnode_syspath, devicetree_syspath);
if (!ofnode_path)
return log_device_debug_errno(ofnode_dev, SYNTHETIC_ERRNO(EINVAL),
- "The device '%s' is not a child device of '%s': %m",
+ "The device '%s' is not a child device of '%s'.",
ofnode_syspath, devicetree_syspath);
/* Get back our leading / to match the contents of the aliases */
@@ -855,7 +855,7 @@ static int names_devicetree(sd_device *dev, const char *prefix, EventMode mode)
/* ...but make sure we don't have an alias conflict */
if (i == 0 && device_get_sysattr_value_filtered(aliases_dev, conflict, NULL) >= 0)
return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EEXIST),
- "Ethernet alias conflict: ethernet and ethernet0 both exist");
+ "Ethernet alias conflict: ethernet and ethernet0 both exist.");
char str[ALTIFNAMSIZ];
if (snprintf_ok(str, sizeof str, "%sd%u", prefix, i))
@@ -1232,7 +1232,7 @@ static int names_xen(sd_device *dev, const char *prefix, EventMode mode) {
p = startswith(vif, "vif-");
if (!p)
- return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL), "Invalid vif name: %s: %m", vif);
+ return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL), "Invalid vif name: %s.", vif);
r = safe_atou_full(p, SAFE_ATO_REFUSE_PLUS_MINUS | SAFE_ATO_REFUSE_LEADING_ZERO |
SAFE_ATO_REFUSE_LEADING_WHITESPACE | 10, &id);