tree-wide: normalize usage of %m

This commit is contained in:
Yu Watanabe
2025-07-22 03:05:54 +09:00
parent 5918ba9c69
commit 5c34d85c74
12 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ int mac_selinux_setup(bool *loaded_policy) {
if (enforce > 0) {
if (!initialized)
return log_struct_errno(LOG_EMERG, SYNTHETIC_ERRNO(EIO),
LOG_MESSAGE("Failed to load SELinux policy :%m"),
LOG_MESSAGE("Failed to load SELinux policy: %m"),
LOG_MESSAGE_ID(SD_MESSAGE_SELINUX_FAILED_STR));
log_notice("Failed to load new SELinux policy. Continuing with old policy.");
+1 -1
View File
@@ -393,7 +393,7 @@ static void service_extend_event_source_timeout(Service *s, sd_event_source *sou
if (r < 0) {
const char *desc;
(void) sd_event_source_get_description(s->timer_event_source, &desc);
log_unit_warning_errno(UNIT(s), r, "Failed to set timeout time for event source '%s', ignoring %m", strna(desc));
log_unit_warning_errno(UNIT(s), r, "Failed to set timeout time for event source '%s', ignoring: %m", strna(desc));
}
}
+1 -1
View File
@@ -304,7 +304,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) {
f = fopen("/usr/share/X11/xkb/rules/base.lst", "re");
if (!f)
return log_error_errno(errno, "Failed to open keyboard mapping list. %m");
return log_error_errno(errno, "Failed to open keyboard mapping list: %m");
if (streq(argv[0], "list-x11-keymap-models"))
look_for = MODELS;
+2 -2
View File
@@ -107,11 +107,11 @@ static int wall_message_timeout_handler(
if (next > 0) {
r = sd_event_source_set_time(s, n + next);
if (r < 0)
return log_error_errno(r, "sd_event_source_set_time() failed. %m");
return log_error_errno(r, "sd_event_source_set_time() failed: %m");
r = sd_event_source_set_enabled(s, SD_EVENT_ONESHOT);
if (r < 0)
return log_error_errno(r, "sd_event_source_set_enabled() failed. %m");
return log_error_errno(r, "sd_event_source_set_enabled() failed: %m");
}
return 0;
+1 -1
View File
@@ -1187,7 +1187,7 @@ static int run(int argc, char *argv[]) {
if (r == -ESRCH)
return log_error_errno(r, "Parent already died?");
if (r < 0)
return log_error_errno(r, "Failed to send SIGUSR2 signal to parent. %m");
return log_error_errno(r, "Failed to send SIGUSR2 signal to parent: %m");
}
}
+1 -1
View File
@@ -2069,7 +2069,7 @@ static int run(int argc, char *argv[]) {
if (r == -ESRCH)
return log_error_errno(r, "Parent already died?");
if (r < 0)
return log_error_errno(r, "Failed to send SIGUSR2 signal to parent. %m");
return log_error_errno(r, "Failed to send SIGUSR2 signal to parent: %m");
}
}
+2 -2
View File
@@ -527,13 +527,13 @@ int oomd_system_context_acquire(const char *proc_meminfo_path, OomdSystemContext
if (mem_available > ctx.mem_total)
return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
"MemAvailable (%" PRIu64 ") cannot be greater than MemTotal (%" PRIu64 ") %m",
"MemAvailable (%" PRIu64 ") cannot be greater than MemTotal (%" PRIu64 ")",
mem_available,
ctx.mem_total);
if (swap_free > ctx.swap_total)
return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
"SwapFree (%" PRIu64 ") cannot be greater than SwapTotal (%" PRIu64 ") %m",
"SwapFree (%" PRIu64 ") cannot be greater than SwapTotal (%" PRIu64 ")",
swap_free,
ctx.swap_total);
+1 -1
View File
@@ -384,7 +384,7 @@ static int mdns_goodbye_callback(sd_event_source *s, uint64_t usec, void *userda
r = mdns_notify_browsers_goodbye(scope);
if (r < 0)
log_warning_errno(r, "mDNS: Failed to notify service subscribers of goodbyes, ignoring: %m");
log_warning_errno(r, "mDNS: Failed to notify service subscribers of goodbyes, ignoring: %m");
if (dns_cache_expiry_in_one_second(&scope->cache, usec)) {
r = sd_event_add_time_relative(
+2 -2
View File
@@ -1538,7 +1538,7 @@ int seccomp_protect_syslog(void) {
0);
if (r < 0) {
log_debug_errno(r, "Failed to add syslog() rule for architecture %s, skipping %m", seccomp_arch_to_string(arch));
log_debug_errno(r, "Failed to add syslog() rule for architecture %s, skipping: %m", seccomp_arch_to_string(arch));
continue;
}
@@ -1546,7 +1546,7 @@ int seccomp_protect_syslog(void) {
if (ERRNO_IS_NEG_SECCOMP_FATAL(r))
return r;
if (r < 0)
log_debug_errno(r, "Failed to install syslog protection rules for architecture %s, skipping %m",
log_debug_errno(r, "Failed to install syslog protection rules for architecture %s, skipping: %m",
seccomp_arch_to_string(arch));
}
+2 -2
View File
@@ -249,12 +249,12 @@ static int test_bpf_cgroup_programs(Manager *m, const char *unit_name, const Tes
ASSERT_OK(unit_patch_contexts(u));
r = unit_start(u, NULL);
if (r < 0)
return log_error_errno(r, "Unit start failed %m");
return log_error_errno(r, "Unit start failed: %m");
while (!IN_SET(SERVICE(u)->state, SERVICE_DEAD, SERVICE_FAILED)) {
r = sd_event_run(m->event, UINT64_MAX);
if (r < 0)
return log_error_errno(r, "Event run failed %m");
return log_error_errno(r, "Event run failed: %m");
}
cld_code = SERVICE(u)->exec_command[SERVICE_EXEC_START]->exec_status.code;
+2 -2
View File
@@ -41,12 +41,12 @@ static int test_restrict_filesystems(Manager *m, const char *unit_name, const ch
ASSERT_OK(unit_patch_contexts(u));
r = unit_start(u, NULL);
if (r < 0)
return log_error_errno(r, "Unit start failed %m");
return log_error_errno(r, "Unit start failed: %m");
while (!IN_SET(SERVICE(u)->state, SERVICE_DEAD, SERVICE_FAILED)) {
r = sd_event_run(m->event, UINT64_MAX);
if (r < 0)
return log_error_errno(r, "Event run failed %m");
return log_error_errno(r, "Event run failed: %m");
}
cld_code = SERVICE(u)->exec_command[SERVICE_EXEC_START]->exec_status.code;
+2 -2
View File
@@ -80,12 +80,12 @@ static int test_socket_bind(
ASSERT_OK(unit_patch_contexts(u));
r = unit_start(u, NULL);
if (r < 0)
return log_error_errno(r, "Unit start failed %m");
return log_error_errno(r, "Unit start failed: %m");
while (!IN_SET(SERVICE(u)->state, SERVICE_DEAD, SERVICE_FAILED)) {
r = sd_event_run(m->event, UINT64_MAX);
if (r < 0)
return log_error_errno(r, "Event run failed %m");
return log_error_errno(r, "Event run failed: %m");
}
cld_code = SERVICE(u)->exec_command[SERVICE_EXEC_START]->exec_status.code;