diff --git a/src/analyze/analyze-unit-shell.c b/src/analyze/analyze-unit-shell.c index 43eb65932e..607c6af676 100644 --- a/src/analyze/analyze-unit-shell.c +++ b/src/analyze/analyze-unit-shell.c @@ -82,7 +82,7 @@ int verb_unit_shell(int argc, char *argv[], void *userdata) { "(unit-shell-ns)", "(unit-shell)", /* except_fds= */ NULL, - /* n_except_fds */ 0, + /* n_except_fds= */ 0, FORK_RESET_SIGNALS|FORK_DEATHSIG_SIGKILL, pidns_fd, mntns_fd, diff --git a/src/basic/conf-files.c b/src/basic/conf-files.c index 2e4f28ba88..b1b0c74637 100644 --- a/src/basic/conf-files.c +++ b/src/basic/conf-files.c @@ -291,7 +291,7 @@ static int files_add( if (need_stat) { /* If we need to have stat, skip the entry. */ - log_debug_errno(SYNTHETIC_ERRNO(ENOENT), "Failed to chase '%s/%s', ignoring: %m", + log_debug_errno(SYNTHETIC_ERRNO(ENOENT), "Failed to chase '%s/%s', ignoring.", root, skip_leading_slash(original_path)); continue; } diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c index e15004981b..0c9f52685b 100644 --- a/src/basic/terminal-util.c +++ b/src/basic/terminal-util.c @@ -1777,7 +1777,7 @@ int vt_restore(int fd) { assert(fd >= 0); if (!isatty_safe(fd)) - return log_debug_errno(SYNTHETIC_ERRNO(ENOTTY), "Asked to restore the VT for an fd that does not refer to a terminal: %m"); + return log_debug_errno(SYNTHETIC_ERRNO(ENOTTY), "Asked to restore the VT for an fd that does not refer to a terminal."); if (ioctl(fd, KDSETMODE, KD_TEXT) < 0) RET_GATHER(ret, log_debug_errno(errno, "Failed to set VT to text mode, ignoring: %m")); @@ -1804,7 +1804,7 @@ int vt_release(int fd, bool restore) { * VT-switching modes. */ if (!isatty_safe(fd)) - return log_debug_errno(SYNTHETIC_ERRNO(ENOTTY), "Asked to release the VT for an fd that does not refer to a terminal: %m"); + return log_debug_errno(SYNTHETIC_ERRNO(ENOTTY), "Asked to release the VT for an fd that does not refer to a terminal."); if (ioctl(fd, VT_RELDISP, 1) < 0) return -errno; diff --git a/src/bless-boot/bless-boot.c b/src/bless-boot/bless-boot.c index 9b2dc08d61..9c717ace9d 100644 --- a/src/bless-boot/bless-boot.c +++ b/src/bless-boot/bless-boot.c @@ -236,7 +236,7 @@ static int acquire_boot_count_path( if (r < 0) return log_error_errno(r, "Failed to extract filename from LoaderBootCountPath '%s': %m", path); if (r == 0) - return log_error_errno(SYNTHETIC_ERRNO(EADDRNOTAVAIL), "LoaderBootCountPath '%s' refers to the root directory: %m", path); + return log_error_errno(SYNTHETIC_ERRNO(EADDRNOTAVAIL), "LoaderBootCountPath '%s' refers to the root directory.", path); if (strlen(last) > (size_t) r) return log_error_errno(SYNTHETIC_ERRNO(EISDIR), "LoaderBootCountPath '%s' refers to directory path, refusing.", path); diff --git a/src/boot/pe.c b/src/boot/pe.c index beab0eb670..8f38463041 100644 --- a/src/boot/pe.c +++ b/src/boot/pe.c @@ -366,8 +366,8 @@ static void pe_locate_sections( n_section_table, section_names, validate_base, - /* device_base */ NULL, - /* device */ NULL, + /* device_table = */ NULL, + /* device = */ NULL, sections); /* It doesn't make sense not to provide validate_base here */ @@ -386,8 +386,8 @@ static void pe_locate_sections( n_section_table, hwid_section_names, validate_base, - /* device_table */ NULL, - /* device */ NULL, + /* device_table = */ NULL, + /* device = */ NULL, hwids_section); if (PE_SECTION_VECTOR_IS_SET(hwids_section)) { diff --git a/src/boot/secure-boot.c b/src/boot/secure-boot.c index 84c86fe424..883e8487e4 100644 --- a/src/boot/secure-boot.c +++ b/src/boot/secure-boot.c @@ -120,7 +120,7 @@ EFI_STATUS secure_boot_enroll_at(EFI_FILE *root_dir, const char16_t *path, bool err = open_directory(root_dir, path, &dir); if (err != EFI_SUCCESS) - return log_error_status(err, "Failed opening keys directory %ls: %m", path); + return log_error_status(err, "Failed to open keys directory %ls: %m", path); struct { const char16_t *name; @@ -140,7 +140,7 @@ EFI_STATUS secure_boot_enroll_at(EFI_FILE *root_dir, const char16_t *path, bool FOREACH_ELEMENT(sb_var, sb_vars) { err = file_read(dir, sb_var->filename, 0, 0, &sb_var->buffer, &sb_var->size); if (err != EFI_SUCCESS && sb_var->required) { - log_error_status(err, "Failed reading file %ls\\%ls: %m", path, sb_var->filename); + log_error_status(err, "Failed to read file %ls\\%ls: %m", path, sb_var->filename); goto out_deallocate; } if (streq16(sb_var->name, u"PK") && sb_var->size > 20) { @@ -161,7 +161,7 @@ EFI_STATUS secure_boot_enroll_at(EFI_FILE *root_dir, const char16_t *path, bool } if (need_custom_mode && !custom_mode_enabled()) { - err = set_custom_mode(/* enable */ true); + err = set_custom_mode(/* enable = */ true); if (err != EFI_SUCCESS) { log_error_status(err, "Failed to enable custom mode: %m"); goto out_deallocate; diff --git a/src/bootctl/bootctl-random-seed.c b/src/bootctl/bootctl-random-seed.c index 4d0e50d600..a9826ca9e6 100644 --- a/src/bootctl/bootctl-random-seed.c +++ b/src/bootctl/bootctl-random-seed.c @@ -34,7 +34,7 @@ static int random_seed_verify_permissions(int fd, mode_t expected_type) { if (((st.st_mode ^ expected_type) & S_IFMT) != 0) return log_error_errno(SYNTHETIC_ERRNO(EBADF), - "Unexpected inode type when validating random seed access mode on %s: %m", full_path); + "Unexpected inode type when validating random seed access mode on '%s'.", full_path); if ((st.st_mode & 0007) == 0) /* All world bits are off? Then all is good */ return 0; diff --git a/src/core/bpf-restrict-ifaces.c b/src/core/bpf-restrict-ifaces.c index dc8b976b7f..0c66ae0630 100644 --- a/src/core/bpf-restrict-ifaces.c +++ b/src/core/bpf-restrict-ifaces.c @@ -211,7 +211,7 @@ int bpf_restrict_ifaces_supported(void) { int bpf_restrict_ifaces_install(Unit *u) { return log_unit_debug_errno(u, SYNTHETIC_ERRNO(EOPNOTSUPP), - "restrict-interfaces: Failed to install; BPF programs built from source code are not supported: %m"); + "restrict-interfaces: Failed to install; BPF programs built from source code are not supported."); } int bpf_restrict_ifaces_serialize(Unit *u, FILE *f, FDSet *fds) { diff --git a/src/core/dbus.c b/src/core/dbus.c index 1659089dd9..e29354fd74 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -921,7 +921,7 @@ int bus_init_private(Manager *m) { r = sockaddr_un_set_path(&sa.un, p); } if (r < 0) - return log_error_errno(r, "Failed set socket path for private bus: %m"); + return log_error_errno(r, "Failed to set socket path for private bus: %m"); sa_len = r; (void) sockaddr_un_unlink(&sa.un); diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index 82a6a12a98..dbac295824 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -2791,7 +2791,7 @@ static int apply_exec_quotas( #define MAX_PROJ_ID_RETRIES 10 for (unsigned attempt = 0;; attempt++) { if (attempt >= MAX_PROJ_ID_RETRIES) - return log_debug_errno(SYNTHETIC_ERRNO(EBUSY), "Failed to generate unique project ID for %s: %m", target_dir); + return log_debug_errno(SYNTHETIC_ERRNO(EBUSY), "Failed to generate unique project ID for '%s'.", target_dir); /* Check if project quotas are supported */ struct dqblk req; @@ -4608,7 +4608,7 @@ static int setup_delegated_namespaces( exec_namespace_is_delegated(context, params, have_cap_sys_admin, CLONE_NEWPID) == delegate) { if (params->pidref_transport_fd < 0) { *reterr_exit_status = EXIT_NAMESPACE; - return log_error_errno(SYNTHETIC_ERRNO(ENOTCONN), "PidRef socket is not set up: %m"); + return log_error_errno(SYNTHETIC_ERRNO(ENOTCONN), "PidRef socket is not set up."); } /* If we had CAP_SYS_ADMIN prior to joining the user namespace, then we are privileged and don't need diff --git a/src/core/job.c b/src/core/job.c index bac12542dc..4291d36648 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -1199,7 +1199,7 @@ void job_add_to_run_queue(Job *j) { r = prioq_put(j->manager->run_queue, j, &j->run_queue_idx); if (r < 0) - log_warning_errno(r, "Failed put job in run queue, ignoring: %m"); + log_warning_errno(r, "Failed to put job in run queue, ignoring: %m"); else j->in_run_queue = true; diff --git a/src/core/main.c b/src/core/main.c index 6c44b4e00f..4fc870d6c0 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1421,7 +1421,7 @@ static int os_release_status(void) { } } - if (support_end && os_release_support_ended(support_end, /* quiet */ false, NULL) > 0) + if (support_end && os_release_support_ended(support_end, /* quiet = */ false, /* ret_eol = */ NULL) > 0) /* pretty_name may include the version already, so we'll print the version only if we * have it and we're not using pretty_name. */ status_printf(ANSI_HIGHLIGHT_RED " !! " ANSI_NORMAL, 0, diff --git a/src/core/selinux-setup.c b/src/core/selinux-setup.c index 8e87b1be28..db14db88ee 100644 --- a/src/core/selinux-setup.c +++ b/src/core/selinux-setup.c @@ -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."), LOG_MESSAGE_ID(SD_MESSAGE_SELINUX_FAILED_STR)); log_notice("Failed to load new SELinux policy. Continuing with old policy."); diff --git a/src/core/service.c b/src/core/service.c index 15052f9d0c..797f2e7c93 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -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)); } } diff --git a/src/core/socket.c b/src/core/socket.c index f7c61d2797..f648721f05 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -1578,7 +1578,7 @@ static int socket_address_listen_in_cgroup( r = unit_setup_exec_runtime(UNIT(s)); if (r < 0) - return log_unit_error_errno(UNIT(s), r, "Failed acquire runtime: %m"); + return log_unit_error_errno(UNIT(s), r, "Failed to acquire runtime: %m"); if (s->exec_context.network_namespace_path && s->exec_runtime && diff --git a/src/cryptenroll/cryptenroll-password.c b/src/cryptenroll/cryptenroll-password.c index 8c7e38b82c..7761aba21f 100644 --- a/src/cryptenroll/cryptenroll-password.c +++ b/src/cryptenroll/cryptenroll-password.c @@ -188,7 +188,7 @@ int enroll_password( } } - r = check_password_quality(new_password, /* old */ NULL, /* user */ NULL, &error); + r = check_password_quality(new_password, /* old = */ NULL, /* user = */ NULL, &error); if (ERRNO_IS_NEG_NOT_SUPPORTED(r)) log_warning("Password quality check is not supported, proceeding anyway."); else if (r < 0) diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c index 8dd8439ab8..9eef624861 100644 --- a/src/dissect/dissect.c +++ b/src/dissect/dissect.c @@ -1556,7 +1556,7 @@ static int action_list_or_mtree_or_copy_or_make_archive(DissectedImage *m, LoopD * the mounts are done in a mount namespace there's not going to be a collision here */ r = get_common_dissect_directory(&t); if (r < 0) - return log_error_errno(r, "Failed generate private mount directory: %m"); + return log_error_errno(r, "Failed to generate private mount directory: %m"); r = dissected_image_mount_and_warn( m, diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index 4462086e78..5ed6d3a9d2 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -824,7 +824,7 @@ static int prompt_root_password(int rfd) { break; } - r = check_password_quality(*a, /* old */ NULL, "root", &error); + r = check_password_quality(*a, /* old = */ NULL, "root", &error); if (ERRNO_IS_NEG_NOT_SUPPORTED(r)) log_warning("Password quality check is not supported, proceeding anyway."); else if (r < 0) diff --git a/src/home/homectl-pkcs11.c b/src/home/homectl-pkcs11.c index 38541c51ce..3a0ae30623 100644 --- a/src/home/homectl-pkcs11.c +++ b/src/home/homectl-pkcs11.c @@ -135,7 +135,7 @@ static int add_pkcs11_encrypted_key( r = sd_json_variant_append_array(&l, e); if (r < 0) - return log_error_errno(r, "Failed append PKCS#11 encrypted key: %m"); + return log_error_errno(r, "Failed to append PKCS#11 encrypted key: %m"); r = sd_json_variant_set_field(&w, "pkcs11EncryptedKey", l); if (r < 0) diff --git a/src/home/homectl-recovery-key.c b/src/home/homectl-recovery-key.c index c8d6a9b2fa..b71bf99c33 100644 --- a/src/home/homectl-recovery-key.c +++ b/src/home/homectl-recovery-key.c @@ -31,7 +31,7 @@ static int add_privileged(sd_json_variant **v, const char *hashed) { r = sd_json_variant_append_array(&l, e); if (r < 0) - return log_error_errno(r, "Failed append recovery key: %m"); + return log_error_errno(r, "Failed to append recovery key: %m"); r = sd_json_variant_set_field(&w, "recoveryKey", l); if (r < 0) diff --git a/src/home/homectl.c b/src/home/homectl.c index 166e7a71bb..329572fb34 100644 --- a/src/home/homectl.c +++ b/src/home/homectl.c @@ -2623,7 +2623,7 @@ static int acquire_group_list(char ***ret) { if (r == -ESRCH) break; if (r < 0) - return log_debug_errno(r, "Failed acquire next group: %m"); + return log_debug_errno(r, "Failed to acquire next group: %m"); if (group_record_disposition(gr) == USER_REGULAR) { _cleanup_(user_record_unrefp) UserRecord *ur = NULL; @@ -5227,7 +5227,7 @@ static int verb_list_signing_keys(int argc, char *argv[], void *userdata) { _cleanup_free_ void *der = NULL; int n = i2d_PUBKEY(key, (unsigned char**) &der); if (n < 0) - return log_error_errno(SYNTHETIC_ERRNO(ENOTRECOVERABLE), "Failed to encode key as DER: %m"); + return log_error_errno(SYNTHETIC_ERRNO(ENOTRECOVERABLE), "Failed to encode key as DER."); ssize_t m = base64mem(der, MIN(n, 64), &h); if (m < 0) diff --git a/src/home/homework-cifs.c b/src/home/homework-cifs.c index 1a2195371a..a34f075499 100644 --- a/src/home/homework-cifs.c +++ b/src/home/homework-cifs.c @@ -49,7 +49,7 @@ int home_setup_cifs( r = parse_cifs_service(h->cifs_service, &chost, &cservice, &cdir); if (r < 0) - return log_error_errno(r, "Failed parse CIFS service specification: %m"); + return log_error_errno(r, "Failed to parse CIFS service specification: %m"); /* Just the host and service part, without the directory */ chost_and_service = strjoin("//", chost, "/", cservice); diff --git a/src/home/homework-fscrypt.c b/src/home/homework-fscrypt.c index bfcfb6774f..be61d2b36f 100644 --- a/src/home/homework-fscrypt.c +++ b/src/home/homework-fscrypt.c @@ -415,7 +415,7 @@ int home_setup_fscrypt( FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_DEATHSIG_SIGTERM|FORK_LOG|FORK_WAIT|FORK_REOPEN_LOG, NULL); if (r < 0) - return log_error_errno(r, "Failed install encryption key in user's keyring: %m"); + return log_error_errno(r, "Failed to install encryption key in user's keyring: %m"); if (r == 0) { /* Child */ diff --git a/src/home/homework-luks.c b/src/home/homework-luks.c index 2d6a549c22..211c88aaca 100644 --- a/src/home/homework-luks.c +++ b/src/home/homework-luks.c @@ -1227,7 +1227,7 @@ static int open_image_file( if (!S_ISREG(st.st_mode) && !S_ISBLK(st.st_mode)) return log_error_errno( S_ISDIR(st.st_mode) ? SYNTHETIC_ERRNO(EISDIR) : SYNTHETIC_ERRNO(EBADFD), - "Image file %s is not a regular file or block device: %m", ip); + "Image file %s is not a regular file or block device.", ip); /* Locking block devices doesn't really make sense, as this might interfere with * udev's workings, and these locks aren't network propagated anyway, hence not what @@ -2731,7 +2731,7 @@ static int prepare_resize_partition( r = sd_id128_from_string(disk_uuid_as_string, &disk_uuid); if (r < 0) - return log_error_errno(r, "Failed parse disk UUID: %m"); + return log_error_errno(r, "Failed to parse disk UUID: %m"); r = fdisk_get_partitions(c, &t); if (r < 0) diff --git a/src/home/user-record-password-quality.c b/src/home/user-record-password-quality.c index 844c42c52b..b23f717c0e 100644 --- a/src/home/user-record-password-quality.c +++ b/src/home/user-record-password-quality.c @@ -63,7 +63,7 @@ int user_record_check_password_quality( continue; /* If there are no old passwords, let's call check_password_quality() without any. */ - r = check_password_quality(*pp, /* old */ NULL, hr->user_name, &auxerror); + r = check_password_quality(*pp, /* old = */ NULL, hr->user_name, &auxerror); if (r <= 0) goto error; } diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 326883bbe3..06fb3f2878 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -636,7 +636,7 @@ static const char* fallback_chassis_by_acpi(Context *c) { r = device_get_sysattr_unsigned(c->device_acpi, "pm_profile", &t); if (r < 0) { - log_debug_errno(r, "Failed read/parse ACPI PM profile, ignoring: %m"); + log_debug_errno(r, "Failed to read/parse ACPI PM profile, ignoring: %m"); return NULL; } diff --git a/src/import/import-fs.c b/src/import/import-fs.c index 22fddaa58b..a132ab64f0 100644 --- a/src/import/import-fs.c +++ b/src/import/import-fs.c @@ -249,7 +249,7 @@ static int import_fs(int argc, char *argv[], void *userdata) { (arg_read_only ? INSTALL_READ_ONLY : 0) | (arg_sync ? INSTALL_SYNCFS : 0)); if (r < 0) - return log_error_errno(r, "Failed install directory as '%s': %m", final_path); + return log_error_errno(r, "Failed to install directory as '%s': %m", final_path); temp_path = mfree(temp_path); diff --git a/src/import/import-generator.c b/src/import/import-generator.c index 176ee7cb8a..7b4a96f8a7 100644 --- a/src/import/import-generator.c +++ b/src/import/import-generator.c @@ -63,14 +63,14 @@ static int parse_pull_expression(const char *v) { if (r < 0) return log_error_errno(r, "Failed to extract option string from pull expression '%s': %m", v); if (r == 0) - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "No option string in pull expression '%s': %m", v); + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "No option string in pull expression '%s'.", v); _cleanup_free_ char *local = NULL; r = extract_first_word(&p, &local, ":", EXTRACT_DONT_COALESCE_SEPARATORS); if (r < 0) return log_error_errno(r, "Failed to extract local name from pull expression '%s': %m", v); if (r == 0) - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "No local string in pull expression '%s': %m", v); + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "No local string in pull expression '%s'.", v); _cleanup_free_ char *remote = strdup(p); if (!remote) diff --git a/src/import/importctl.c b/src/import/importctl.c index ecabf61e9e..5f3a04a752 100644 --- a/src/import/importctl.c +++ b/src/import/importctl.c @@ -274,7 +274,7 @@ static int import_tar(int argc, char *argv[], void *userdata) { return log_error_errno(r, "Cannot extract container name from filename: %m"); if (r == O_DIRECTORY) return log_error_errno(SYNTHETIC_ERRNO(EISDIR), - "Path '%s' refers to directory, but we need a regular file: %m", path); + "Path '%s' refers to directory, but we need a regular file.", path); local = fn; } @@ -353,7 +353,7 @@ static int import_raw(int argc, char *argv[], void *userdata) { return log_error_errno(r, "Cannot extract container name from filename: %m"); if (r == O_DIRECTORY) return log_error_errno(SYNTHETIC_ERRNO(EISDIR), - "Path '%s' refers to directory, but we need a regular file: %m", path); + "Path '%s' refers to directory, but we need a regular file.", path); local = fn; } diff --git a/src/import/importd.c b/src/import/importd.c index 5289707ec8..84cc9ca86a 100644 --- a/src/import/importd.c +++ b/src/import/importd.c @@ -713,7 +713,7 @@ static int manager_new(Manager **ret) { r = sd_event_add_memory_pressure(m->event, NULL, NULL, NULL); if (r < 0) - log_debug_errno(r, "Failed allocate memory pressure event source, ignoring: %m"); + log_debug_errno(r, "Failed to allocate memory pressure event source, ignoring: %m"); r = sd_event_set_watchdog(m->event, true); if (r < 0) diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c index 46a58e228b..d669d27274 100644 --- a/src/journal-remote/journal-upload.c +++ b/src/journal-remote/journal-upload.c @@ -682,7 +682,7 @@ static int parse_config(void) { { "Upload", "TrustedCertificateFile", config_parse_path_or_ignore, 0, &arg_trust }, { "Upload", "NetworkTimeoutSec", config_parse_sec, 0, &arg_network_timeout_usec }, { "Upload", "Header", config_parse_header, 0, &arg_headers }, - { "Upload", "Compression", config_parse_compression, /* with_level */ true, &arg_compression }, + { "Upload", "Compression", config_parse_compression, /* with_level = */ true, &arg_compression }, { "Upload", "ForceCompression", config_parse_bool, 0, &arg_force_compression }, {} }; diff --git a/src/journal/journald-client.c b/src/journal/journald-client.c index 659b9c5e88..6641c09336 100644 --- a/src/journal/journald-client.c +++ b/src/journal/journald-client.c @@ -84,7 +84,7 @@ int client_context_read_log_filter_patterns(ClientContext *c, const char *cgroup const char *deny_list_xattr = memchr(xattr, (char)0xff, xattr_size); if (!deny_list_xattr) return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG), - "Missing delimiter in cgroup user.journald_log_filter_patterns attribute: %m"); + "Missing delimiter in cgroup user.journald_log_filter_patterns attribute."); _cleanup_set_free_ Set *allow_list = NULL; r = client_parse_log_filter_nulstr(xattr, deny_list_xattr - xattr, &allow_list); diff --git a/src/journal/journald-config.c b/src/journal/journald-config.c index 4a514cd573..dd2e29e296 100644 --- a/src/journal/journald-config.c +++ b/src/journal/journald-config.c @@ -377,7 +377,7 @@ int manager_dispatch_reload_signal(sd_event_source *s, const struct signalfd_sig manager_reopen_journals(m, &old); log_info("Config file reloaded."); - (void) sd_notify(/* unset_environment */ false, NOTIFY_READY_MESSAGE); + (void) sd_notify(/* unset_environment = */ false, NOTIFY_READY_MESSAGE); return 0; } diff --git a/src/journal/journald-manager.c b/src/journal/journald-manager.c index bd2a05489d..743aea3868 100644 --- a/src/journal/journald-manager.c +++ b/src/journal/journald-manager.c @@ -1467,7 +1467,7 @@ int manager_relinquish_var(Manager *m) { log_debug("Relinquishing %s...", m->system_storage.path); - (void) manager_system_journal_open(m, /* flush_requested */ false, /* relinquish_requested=*/ true); + (void) manager_system_journal_open(m, /* flush_requested = */ false, /* relinquish_requested = */ true); m->system_journal = journal_file_offline_close(m->system_journal); ordered_hashmap_clear(m->user_journals); @@ -2290,7 +2290,7 @@ void manager_reopen_journals(Manager *m, const JournalConfig *old) { (void) manager_system_journal_open(m, /* flush_requested = */ false, /* relinquish_requested = */ false); /* To make the storage related settings applied, vacuum the storage. */ - manager_vacuum(m, /* verbose */ false); + manager_vacuum(m, /* verbose = */ false); } int manager_new(Manager **ret) { diff --git a/src/libsystemd-network/sd-ndisc-redirect.c b/src/libsystemd-network/sd-ndisc-redirect.c index 1637ad36a2..4845adbd7b 100644 --- a/src/libsystemd-network/sd-ndisc-redirect.c +++ b/src/libsystemd-network/sd-ndisc-redirect.c @@ -61,14 +61,14 @@ int ndisc_redirect_parse(sd_ndisc *nd, sd_ndisc_redirect *rd) { * The ICMP Destination Address field in the redirect message does not contain a multicast address. */ if (in6_addr_is_null(&rd->destination_address) || in6_addr_is_multicast(&rd->destination_address)) return log_ndisc_errno(nd, SYNTHETIC_ERRNO(EBADMSG), - "Received Redirect message with an invalid destination address, ignoring datagram: %m"); + "Received Redirect message with an invalid destination address, ignoring datagram."); /* RFC 4861 section 8.1 * The ICMP Target Address is either a link-local address (when redirected to a router) or the same * as the ICMP Destination Address (when redirected to the on-link destination). */ if (!in6_addr_is_link_local(&rd->target_address) && !in6_addr_equal(&rd->target_address, &rd->destination_address)) return log_ndisc_errno(nd, SYNTHETIC_ERRNO(EBADMSG), - "Received Redirect message with an invalid target address, ignoring datagram: %m"); + "Received Redirect message with an invalid target address, ignoring datagram."); r = ndisc_parse_options(rd->packet, &rd->options); if (r < 0) diff --git a/src/libsystemd-network/test-ndisc-send.c b/src/libsystemd-network/test-ndisc-send.c index 2b40ea77a3..7f94c7aeb0 100644 --- a/src/libsystemd-network/test-ndisc-send.c +++ b/src/libsystemd-network/test-ndisc-send.c @@ -309,7 +309,7 @@ static int parse_argv(int argc, char *argv[]) { if (hw_addr.length != sizeof(struct ether_addr)) return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), - "Unsupported hardware address length %zu: %m", + "Unsupported hardware address length %zu.", hw_addr.length); arg_source_mac = hw_addr.ether; diff --git a/src/libsystemd/sd-bus/bus-container.c b/src/libsystemd/sd-bus/bus-container.c index 73e86bb78c..1e4899c356 100644 --- a/src/libsystemd/sd-bus/bus-container.c +++ b/src/libsystemd/sd-bus/bus-container.c @@ -85,11 +85,11 @@ int bus_container_connect_socket(sd_bus *b) { if (n > 0) { if (n != sizeof(error_buf)) return log_debug_errno(SYNTHETIC_ERRNO(EIO), - "Read error status of unexpected length %zd from (sd-buscntr): %m", n); + "Read error status of unexpected length %zd from (sd-buscntr).", n); if (error_buf < 0) return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG), - "Got unexpected error status from (sd-buscntr): %m"); + "Got unexpected error status from (sd-buscntr)."); if (error_buf == EINPROGRESS) return 1; diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 869747e929..6cb496c541 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -3631,7 +3631,7 @@ static int process_timer( * again. */ assert(s->ratelimited); - r = event_source_leave_ratelimit(s, /* run_callback */ true); + r = event_source_leave_ratelimit(s, /* run_callback = */ true); if (r < 0) return r; else if (r == 1) @@ -5116,7 +5116,7 @@ _public_ int sd_event_source_set_ratelimit(sd_event_source *s, uint64_t interval /* When ratelimiting is configured we'll always reset the rate limit state first and start fresh, * non-ratelimited. */ - r = event_source_leave_ratelimit(s, /* run_callback */ false); + r = event_source_leave_ratelimit(s, /* run_callback = */ false); if (r < 0) return r; @@ -5179,7 +5179,7 @@ _public_ int sd_event_source_leave_ratelimit(sd_event_source *s) { if (!s->ratelimited) return 0; - r = event_source_leave_ratelimit(s, /* run_callback */ false); + r = event_source_leave_ratelimit(s, /* run_callback = */ false); if (r < 0) return r; diff --git a/src/libsystemd/sd-journal/journal-vacuum.c b/src/libsystemd/sd-journal/journal-vacuum.c index 7301b72e95..9fcd1b277d 100644 --- a/src/libsystemd/sd-journal/journal-vacuum.c +++ b/src/libsystemd/sd-journal/journal-vacuum.c @@ -255,7 +255,7 @@ int journal_directory_vacuum( r = journal_file_empty(dirfd(d), p); if (r < 0) { - log_debug_errno(r, "Failed check if %s is empty, ignoring: %m", p); + log_debug_errno(r, "Failed to check if %s is empty, ignoring: %m", p); continue; } if (r > 0) { diff --git a/src/libsystemd/sd-journal/test-journal-append.c b/src/libsystemd/sd-journal/test-journal-append.c index 6530cdae8f..b155a7fd7e 100644 --- a/src/libsystemd/sd-journal/test-journal-append.c +++ b/src/libsystemd/sd-journal/test-journal-append.c @@ -134,7 +134,7 @@ static int journal_corrupt_and_append(uint64_t start_offset, uint64_t step) { r = journal_append_message(mj, message); if (r < 0) { /* We care only about crashes or sanitizer errors, - * failed write without any crash is a success */ + * failing to write without any crash is a success */ log_info_errno(r, "Failed to write to the journal: %m"); break; } diff --git a/src/libsystemd/sd-varlink/sd-varlink.c b/src/libsystemd/sd-varlink/sd-varlink.c index 1e70ce41a7..7679cc11e5 100644 --- a/src/libsystemd/sd-varlink/sd-varlink.c +++ b/src/libsystemd/sd-varlink/sd-varlink.c @@ -3480,7 +3480,7 @@ _public_ int sd_varlink_server_add_connection_pair( ucred = *override_ucred; else { if (input_fd != output_fd) - return varlink_server_log_errno(server, SYNTHETIC_ERRNO(EOPNOTSUPP), "Cannot determine peer identity of connection with separate input/output, refusing: %m"); + return varlink_server_log_errno(server, SYNTHETIC_ERRNO(EOPNOTSUPP), "Cannot determine peer identity of connection with separate input/output, refusing."); r = getpeercred(input_fd, &ucred); if (r < 0) diff --git a/src/locale/localectl.c b/src/locale/localectl.c index b60da006b3..c595f81b40 100644 --- a/src/locale/localectl.c +++ b/src/locale/localectl.c @@ -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; diff --git a/src/login/logind-session.c b/src/login/logind-session.c index db835d56d7..071bdb5441 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -734,7 +734,7 @@ static int session_dispatch_stop_on_idle(sd_event_source *source, uint64_t t, vo if (idle) { log_info("Session \"%s\" of user \"%s\" is idle, stopping.", s->id, s->user->user_record->user_name); - return session_stop(s, /* force */ true); + return session_stop(s, /* force = */ true); } r = sd_event_source_set_time( diff --git a/src/login/logind-wall.c b/src/login/logind-wall.c index dabedbdea0..20c667f4ec 100644 --- a/src/login/logind-wall.c +++ b/src/login/logind-wall.c @@ -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; diff --git a/src/login/logind.c b/src/login/logind.c index c5819101e5..9427bae815 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -99,7 +99,7 @@ static int manager_new(Manager **ret) { r = sd_event_add_memory_pressure(m->event, NULL, NULL, NULL); if (r < 0) - log_debug_errno(r, "Failed allocate memory pressure event source, ignoring: %m"); + log_debug_errno(r, "Failed to allocate memory pressure event source, ignoring: %m"); (void) sd_event_set_watchdog(m->event, true); diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index a2f0a7373a..1318211105 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -1812,7 +1812,7 @@ _public_ PAM_EXTERN int pam_sm_close_session( /* desktop= */ NULL, /* area= */ NULL, &debug, - /* default_capability_bounding_set */ NULL, + /* default_capability_bounding_set= */ NULL, /* default_capability_ambient_set= */ NULL) < 0) return PAM_SESSION_ERR; diff --git a/src/mountfsd/mountfsd-manager.c b/src/mountfsd/mountfsd-manager.c index 0fe69b7833..c81671da32 100644 --- a/src/mountfsd/mountfsd-manager.c +++ b/src/mountfsd/mountfsd-manager.c @@ -94,7 +94,7 @@ int manager_new(Manager **ret) { r = sd_event_add_memory_pressure(m->event, NULL, NULL, NULL); if (r < 0) - log_debug_errno(r, "Failed allocate memory pressure event source, ignoring: %m"); + log_debug_errno(r, "Failed to allocate memory pressure event source, ignoring: %m"); r = sd_event_set_watchdog(m->event, true); if (r < 0) @@ -182,7 +182,7 @@ static int start_one_worker(Manager *m) { } r = invoke_callout_binary(SYSTEMD_MOUNTWORK_PATH, STRV_MAKE("systemd-mountwork", "xxxxxxxxxxxxxxxx")); /* With some extra space rename_process() can make use of */ - log_error_errno(r, "Failed start worker process: %m"); + log_error_errno(r, "Failed to start worker process: %m"); _exit(EXIT_FAILURE); } diff --git a/src/mountfsd/mountwork.c b/src/mountfsd/mountwork.c index 21837b96ff..207609d232 100644 --- a/src/mountfsd/mountwork.c +++ b/src/mountfsd/mountwork.c @@ -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"); } } diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c index 31c1a2f723..dcb8bb3cd3 100644 --- a/src/network/generator/network-generator.c +++ b/src/network/generator/network-generator.c @@ -887,7 +887,7 @@ static int parse_cmdline_ip_interface(Context *context, const char *value) { return log_debug_errno(r < 0 ? r : SYNTHETIC_ERRNO(EINVAL), "Failed to parse interface name in ip=%s: %m", value); if (isempty(ifname)) - return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Missing interface name in ip=%s: %m", value); + return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Missing interface name in ip=%s.", value); r = extract_first_word(&p, &dhcp_type, ":", EXTRACT_DONT_COALESCE_SEPARATORS); if (r <= 0) diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c index ff5d156a66..7f6ce3ed3d 100644 --- a/src/network/netdev/macsec.c +++ b/src/network/netdev/macsec.c @@ -998,7 +998,7 @@ static int macsec_read_key_file(NetDev *netdev, SecurityAssociation *sa) { if (key_len != MACSEC_KEYID_LEN) return log_netdev_error_errno(netdev, SYNTHETIC_ERRNO(EINVAL), - "Invalid key length (%zu bytes), ignoring: %m", key_len); + "Invalid key length (%zu bytes), ignoring.", key_len); explicit_bzero_safe(sa->key, sa->key_len); free_and_replace(sa->key, key); diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 4b0263ea72..bade74f3b0 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -1693,7 +1693,7 @@ static int dhcp4_configure(Link *link) { if (link->network->dhcp_fallback_lease_lifetime_usec > 0) { r = sd_dhcp_client_set_fallback_lease_lifetime(link->dhcp_client, link->network->dhcp_fallback_lease_lifetime_usec); if (r < 0) - return log_link_debug_errno(link, r, "DHCPv4 CLIENT: Failed set to lease lifetime: %m"); + return log_link_debug_errno(link, r, "DHCPv4 CLIENT: Failed to set fallback lease lifetime: %m"); } return dhcp4_set_client_identifier(link); diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index 82aa1337fe..e7acf6d126 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -539,7 +539,7 @@ int manager_setup(Manager *m) { r = sd_event_add_memory_pressure(m->event, NULL, NULL, NULL); if (r < 0) - log_debug_errno(r, "Failed allocate memory pressure event source, ignoring: %m"); + log_debug_errno(r, "Failed to allocate memory pressure event source, ignoring: %m"); r = sd_event_add_post(m->event, NULL, manager_post_handler, m); if (r < 0) diff --git a/src/network/wait-online/wait-online-link.c b/src/network/wait-online/wait-online-link.c index 3b7e336a7d..83904ac31a 100644 --- a/src/network/wait-online/wait-online-link.c +++ b/src/network/wait-online/wait-online-link.c @@ -272,8 +272,7 @@ int link_update_monitor(Link *l) { else { r = parse_operational_state_range(required_operstate, &l->required_operstate); if (r < 0) - ret = log_link_debug_errno(l, SYNTHETIC_ERRNO(EINVAL), - "Failed to parse required operational state, ignoring: %m"); + ret = log_link_debug_errno(l, r, "Failed to parse required operational state, ignoring: %m"); } r = network_link_get_operational_state(l->ifindex, &l->operational_state); diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c index 05cad27f91..0f5df64ab4 100644 --- a/src/nspawn/nspawn-mount.c +++ b/src/nspawn/nspawn-mount.c @@ -685,7 +685,7 @@ int mount_all(const char *dest, log_debug_errno(r, "Failed to create directory %s: %m", where); - /* If we failed mkdir() or chown() due to the root directory being read only, + /* If mkdir() or chown() failed due to the root directory being read only, * attempt to mount this fs anyway and let mount_verbose log any errors */ if (r != -EROFS) continue; diff --git a/src/nspawn/nspawn-network.c b/src/nspawn/nspawn-network.c index 4282bae233..50ffffdd3c 100644 --- a/src/nspawn/nspawn-network.c +++ b/src/nspawn/nspawn-network.c @@ -1011,7 +1011,7 @@ static int network_iface_pair_parse(const char* iftype, char ***l, const char *p return log_error_errno(r, "Failed to extract first word in %s parameter: %m", iftype); if (r == 0) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "Short read while reading %s parameter: %m", iftype); + "Short read while reading %s parameter.", iftype); if (!ifname_valid(a)) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "%s, interface name not valid: %s", iftype, a); diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 0bcf444b3a..8013aa94c3 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -1366,7 +1366,7 @@ static int parse_argv(int argc, char *argv[]) { } else { r = read_full_file(optarg, (char**) &p, &l); if (r < 0) - return log_error_errno(r, "Failed parse root hash signature file '%s': %m", optarg); + return log_error_errno(r, "Failed to parse root hash signature file '%s': %m", optarg); } free_and_replace(arg_verity_settings.root_hash_sig, p); @@ -5583,7 +5583,7 @@ static int run_container( r = sd_event_add_memory_pressure(event, NULL, NULL, NULL); if (r < 0) - log_debug_errno(r, "Failed allocate memory pressure event source, ignoring: %m"); + log_debug_errno(r, "Failed to allocate memory pressure event source, ignoring: %m"); /* Exit when the child exits */ (void) sd_event_add_signal(event, NULL, SIGCHLD, on_sigchld, pid); diff --git a/src/nsresourced/nsresourced-manager.c b/src/nsresourced/nsresourced-manager.c index a3a8e0b544..d58d88c7af 100644 --- a/src/nsresourced/nsresourced-manager.c +++ b/src/nsresourced/nsresourced-manager.c @@ -114,7 +114,7 @@ int manager_new(Manager **ret) { r = sd_event_add_memory_pressure(m->event, NULL, NULL, NULL); if (r < 0) - log_debug_errno(r, "Failed allocate memory pressure event source, ignoring: %m"); + log_debug_errno(r, "Failed to allocate memory pressure event source, ignoring: %m"); r = sd_event_set_watchdog(m->event, true); if (r < 0) @@ -230,7 +230,7 @@ static int start_one_worker(Manager *m) { } r = invoke_callout_binary(SYSTEMD_NSRESOURCEWORK_PATH, STRV_MAKE("systemd-nsresourcework", "xxxxxxxxxxxxxxxx")); /* With some extra space rename_process() can make use of */ - log_error_errno(r, "Failed start worker process: %m"); + log_error_errno(r, "Failed to start worker process: %m"); _exit(EXIT_FAILURE); } diff --git a/src/nsresourced/nsresourcework.c b/src/nsresourced/nsresourcework.c index 9427b1885c..a648a72a07 100644 --- a/src/nsresourced/nsresourcework.c +++ b/src/nsresourced/nsresourcework.c @@ -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"); } } diff --git a/src/nsresourced/userns-restrict.c b/src/nsresourced/userns-restrict.c index f85119a265..4c2ee6f20f 100644 --- a/src/nsresourced/userns-restrict.c +++ b/src/nsresourced/userns-restrict.c @@ -40,7 +40,7 @@ static int make_inner_hash_map(void) { MOUNTS_MAX, NULL); if (fd < 0) - return log_debug_errno(errno, "Failed allocate inner BPF map: %m"); + return log_debug_errno(errno, "Failed to allocate inner BPF map: %m"); return fd; } diff --git a/src/oom/oomd-util.c b/src/oom/oomd-util.c index 4b0e4a54aa..4f9808e5c3 100644 --- a/src/oom/oomd-util.c +++ b/src/oom/oomd-util.c @@ -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); diff --git a/src/portable/portabled.c b/src/portable/portabled.c index 6963e9b977..65ceaf40b6 100644 --- a/src/portable/portabled.c +++ b/src/portable/portabled.c @@ -50,7 +50,7 @@ static int manager_new(Manager **ret) { r = sd_event_add_memory_pressure(m->event, NULL, NULL, NULL); if (r < 0) - log_debug_errno(r, "Failed allocate memory pressure event source, ignoring: %m"); + log_debug_errno(r, "Failed to allocate memory pressure event source, ignoring: %m"); (void) sd_event_set_watchdog(m->event, true); diff --git a/src/repart/repart.c b/src/repart/repart.c index 181555ce38..961d5d0e33 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -7601,7 +7601,7 @@ static int resolve_copy_blocks_auto( } } } else if (errno != ENOENT) - return log_error_errno(errno, "Failed open %s: %m", p); + return log_error_errno(errno, "Failed to open %s: %m", p); else { r = resolve_copy_blocks_auto_candidate(devno, type, restrict_devno, &found_uuid); if (r < 0) diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c index b2fa0e3364..66bd7982f5 100644 --- a/src/resolve/resolved-manager.c +++ b/src/resolve/resolved-manager.c @@ -229,7 +229,7 @@ static int manager_process_route(sd_netlink *rtnl, sd_netlink_message *mm, void r = sd_netlink_message_get_type(mm, &type); if (r < 0) { - log_warning_errno(r, "Failed not get message type, ignoring: %m"); + log_warning_errno(r, "Failed to get rtnl message type, ignoring: %m"); return 0; } @@ -785,23 +785,23 @@ int manager_new(Manager **ret) { r = sd_event_add_signal(m->event, /* ret= */ NULL, SIGHUP | SD_EVENT_SIGNAL_PROCMASK, manager_dispatch_reload_signal, m); if (r < 0) - return log_debug_errno(r, "Failed install SIGHUP handler: %m"); + return log_debug_errno(r, "Failed to install SIGHUP handler: %m"); r = sd_event_add_signal(m->event, /* ret= */ NULL, SIGUSR1 | SD_EVENT_SIGNAL_PROCMASK, manager_sigusr1, m); if (r < 0) - return log_debug_errno(r, "Failed install SIGUSR1 handler: %m"); + return log_debug_errno(r, "Failed to install SIGUSR1 handler: %m"); r = sd_event_add_signal(m->event, /* ret= */ NULL, SIGUSR2 | SD_EVENT_SIGNAL_PROCMASK, manager_sigusr2, m); if (r < 0) - return log_debug_errno(r, "Failed install SIGUSR2 handler: %m"); + return log_debug_errno(r, "Failed to install SIGUSR2 handler: %m"); r = sd_event_add_signal(m->event, /* ret= */ NULL, (SIGRTMIN+1) | SD_EVENT_SIGNAL_PROCMASK, manager_sigrtmin1, m); if (r < 0) - return log_debug_errno(r, "Failed install SIGRTMIN+1 handler: %m"); + return log_debug_errno(r, "Failed to install SIGRTMIN+1 handler: %m"); r = sd_event_add_signal(m->event, /* ret= */ NULL, (SIGRTMIN+18) | SD_EVENT_SIGNAL_PROCMASK, sigrtmin18_handler, &m->sigrtmin18_info); if (r < 0) - return log_debug_errno(r, "Failed install SIGRTMIN+18 handler: %m"); + return log_debug_errno(r, "Failed to install SIGRTMIN+18 handler: %m"); manager_cleanup_saved_user(m); diff --git a/src/resolve/resolved-mdns.c b/src/resolve/resolved-mdns.c index e8c44365d1..98539eac6f 100644 --- a/src/resolve/resolved-mdns.c +++ b/src/resolve/resolved-mdns.c @@ -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( diff --git a/src/shared/creds-util.c b/src/shared/creds-util.c index 384b19293a..c54349b9f7 100644 --- a/src/shared/creds-util.c +++ b/src/shared/creds-util.c @@ -178,7 +178,7 @@ int read_credential_with_decryption(const char *name, void **ret, size_t *ret_si if (r >= 0) return 1; /* found */ if (!IN_SET(r, -ENXIO, -ENOENT)) - return log_error_errno(r, "Failed read unencrypted credential '%s': %m", name); + return log_error_errno(r, "Failed to read unencrypted credential '%s': %m", name); r = get_encrypted_credentials_dir(&d); if (r == -ENXIO) @@ -920,7 +920,7 @@ int encrypt_credential_and_warn( r = tpm2_load_pcr_public_key(tpm2_pubkey_path, &pubkey.iov_base, &pubkey.iov_len); if (r < 0) { if (tpm2_pubkey_path || r != -ENOENT || !sd_id128_in_set(with_key, _CRED_AUTO, _CRED_AUTO_INITRD, _CRED_AUTO_SCOPED)) - return log_error_errno(r, "Failed read TPM PCR public key: %m"); + return log_error_errno(r, "Failed to read TPM PCR public key: %m"); log_debug_errno(r, "Failed to read TPM2 PCR public key, proceeding without: %m"); } diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 72165910f1..ac3c92147e 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -3196,7 +3196,7 @@ int image_filter_parse(const char *s, ImageFilter **ret) { if (r < 0) return log_debug_errno(r, "Failed to extract designator: %m"); if (r != 2 || !isempty(x)) - return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Unable to split: %m"); + return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Unable to split: %s", word); PartitionDesignator d = partition_designator_from_string(designator); if (d < 0) @@ -4584,7 +4584,7 @@ int mountfsd_mount_image( if (image_policy) { r = image_policy_to_string(image_policy, /* simplify= */ false, &ps); if (r < 0) - return log_error_errno(r, "Failed format image policy to string: %m"); + return log_error_errno(r, "Failed to format image policy to string: %m"); } sd_json_variant *reply = NULL; diff --git a/src/shared/find-esp.c b/src/shared/find-esp.c index 639076384e..eeec050b60 100644 --- a/src/shared/find-esp.c +++ b/src/shared/find-esp.c @@ -103,7 +103,7 @@ static int verify_esp_blkid( if (r != 0) return log_full_errno(searching ? LOG_DEBUG : LOG_ERR, SYNTHETIC_ERRNO(searching ? EADDRNOTAVAIL : ENODEV), - "No filesystem found on \"%s\": %m", node); + "No filesystem found on \"%s\".", node); if (!streq(v, "vfat")) return log_full_errno(searching ? LOG_DEBUG : LOG_ERR, SYNTHETIC_ERRNO(searching ? EADDRNOTAVAIL : ENODEV), @@ -631,7 +631,7 @@ static int verify_xbootldr_blkid( if (r != 0) return log_full_errno(searching ? LOG_DEBUG : LOG_ERR, searching ? SYNTHETIC_ERRNO(EADDRNOTAVAIL) : SYNTHETIC_ERRNO(EIO), - "%s: Failed to probe PART_ENTRY_SCHEME: %m", node); + "%s: Failed to probe PART_ENTRY_SCHEME.", node); if (streq(type, "gpt")) { errno = 0; diff --git a/src/shared/password-quality-util-passwdqc.c b/src/shared/password-quality-util-passwdqc.c index 004203d17e..f4ecc6ce66 100644 --- a/src/shared/password-quality-util-passwdqc.c +++ b/src/shared/password-quality-util-passwdqc.c @@ -127,7 +127,7 @@ int check_password_quality( check_reason = sym_passwdqc_check(¶ms->qc, password, old, &pw); } else - check_reason = sym_passwdqc_check(¶ms->qc, password, old, /* pw */ NULL); + check_reason = sym_passwdqc_check(¶ms->qc, password, old, /* pw = */ NULL); if (check_reason) { if (ret_error) { diff --git a/src/shared/seccomp-util.c b/src/shared/seccomp-util.c index 5e82a12504..1925f92e53 100644 --- a/src/shared/seccomp-util.c +++ b/src/shared/seccomp-util.c @@ -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)); } diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c index d5106dbb54..20d3463100 100644 --- a/src/shared/tpm2-util.c +++ b/src/shared/tpm2-util.c @@ -1141,7 +1141,7 @@ static int tpm2_credit_random(Tpm2Context *c) { r = random_write_entropy(-1, buffer->buffer, buffer->size, /* credit= */ false); if (r < 0) - return log_debug_errno(r, "Failed wo write entropy to kernel: %m"); + return log_debug_errno(r, "Failed to write entropy to kernel: %m"); done += buffer->size; rps = LESS_BY(rps, buffer->size); diff --git a/src/shared/varlink-serialize.c b/src/shared/varlink-serialize.c index c7e6c5c403..906a1020de 100644 --- a/src/shared/varlink-serialize.c +++ b/src/shared/varlink-serialize.c @@ -57,11 +57,11 @@ int varlink_server_deserialize_one(sd_varlink_server *s, const char *value, FDSe if (v[n] != ' ') return varlink_server_log_errno(s, SYNTHETIC_ERRNO(EINVAL), - "Failed to deserialize sd_varlink_server_socket: %s: %m", value); + "Failed to deserialize sd_varlink_server_socket: %s", value); v = startswith(v + n + 1, "varlink-server-socket-fd="); if (!v) return varlink_server_log_errno(s, SYNTHETIC_ERRNO(EINVAL), - "Failed to deserialize VarlinkServerSocket fd %s: %m", value); + "Failed to deserialize VarlinkServerSocket fd: %s", value); n = strcspn(v, " "); buf = strndupa_safe(v, n); @@ -71,7 +71,7 @@ int varlink_server_deserialize_one(sd_varlink_server *s, const char *value, FDSe return varlink_server_log_errno(s, fd, "Unable to parse VarlinkServerSocket varlink-server-socket-fd=%s: %m", buf); if (!fdset_contains(fds, fd)) return varlink_server_log_errno(s, SYNTHETIC_ERRNO(EBADF), - "VarlinkServerSocket varlink-server-socket-fd= has unknown fd %d: %m", fd); + "VarlinkServerSocket varlink-server-socket-fd= has unknown fd: %d", fd); ss = new(VarlinkServerSocket, 1); if (!ss) diff --git a/src/sysext/sysext.c b/src/sysext/sysext.c index 97a835b8c8..005ea6d977 100644 --- a/src/sysext/sysext.c +++ b/src/sysext/sysext.c @@ -254,7 +254,7 @@ static int need_reload( const char *extension_reload_manager = NULL; int b; - r = load_extension_release_pairs(arg_root, image_class, *extension, /* relax_extension_release_check */ true, &extension_release); + r = load_extension_release_pairs(arg_root, image_class, *extension, /* relax_extension_release_check = */ true, &extension_release); if (r < 0) { log_debug_errno(r, "Failed to parse extension-release metadata of %s, ignoring: %m", *extension); continue; @@ -1547,7 +1547,7 @@ static int store_info_in_meta( /* Make sure the top-level dir has an mtime marking the point we established the merge */ if (utimensat(AT_FDCWD, meta_path, NULL, AT_SYMLINK_NOFOLLOW) < 0) - return log_error_errno(r, "Failed fix mtime of '%s': %m", meta_path); + return log_error_errno(r, "Failed to fix mtime of '%s': %m", meta_path); return 0; } @@ -1731,7 +1731,7 @@ static int merge_subprocess( return log_error_errno(r, "Failed to acquire 'os-release' data of OS tree '%s': %m", empty_to_root(arg_root)); if (isempty(host_os_release_id)) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "'ID' field not found or empty in 'os-release' data of OS tree '%s': %m", + "'ID' field not found or empty in 'os-release' data of OS tree '%s'.", empty_to_root(arg_root)); /* Let's now mount all images */ diff --git a/src/sysupdate/sysupdate-resource.c b/src/sysupdate/sysupdate-resource.c index cb2b05b901..4060deeddf 100644 --- a/src/sysupdate/sysupdate-resource.c +++ b/src/sysupdate/sysupdate-resource.c @@ -327,7 +327,7 @@ static int download_manifest( manifest = fdopen(pfd[0], "r"); if (!manifest) - return log_error_errno(errno, "Failed allocate FILE object for manifest file: %m"); + return log_error_errno(errno, "Failed to allocate FILE object for manifest file: %m"); TAKE_FD(pfd[0]); diff --git a/src/sysupdate/sysupdate-transfer.c b/src/sysupdate/sysupdate-transfer.c index d3e71bb21e..82fd931dab 100644 --- a/src/sysupdate/sysupdate-transfer.c +++ b/src/sysupdate/sysupdate-transfer.c @@ -409,7 +409,7 @@ static int config_parse_resource_ptype( r = gpt_partition_type_from_string(rvalue, &rr->partition_type); if (r < 0) { log_syntax(unit, LOG_WARNING, filename, line, r, - "Failed parse partition type, ignoring: %s", rvalue); + "Failed to parse partition type, ignoring: %s", rvalue); return 0; } @@ -437,7 +437,7 @@ static int config_parse_partition_uuid( r = sd_id128_from_string(rvalue, &t->partition_uuid); if (r < 0) { log_syntax(unit, LOG_WARNING, filename, line, r, - "Failed parse partition UUID, ignoring: %s", rvalue); + "Failed to parse partition UUID, ignoring: %s", rvalue); return 0; } @@ -465,7 +465,7 @@ static int config_parse_partition_flags( r = safe_atou64(rvalue, &t->partition_flags); if (r < 0) { log_syntax(unit, LOG_WARNING, filename, line, r, - "Failed parse partition flags, ignoring: %s", rvalue); + "Failed to parse partition flags, ignoring: %s", rvalue); return 0; } diff --git a/src/sysupdate/sysupdated.c b/src/sysupdate/sysupdated.c index a46e4fdafc..cc45ca0657 100644 --- a/src/sysupdate/sysupdated.c +++ b/src/sysupdate/sysupdated.c @@ -1738,7 +1738,7 @@ static int manager_new(Manager **ret) { r = sd_event_add_memory_pressure(m->event, NULL, NULL, NULL); if (r < 0) - log_debug_errno(r, "Failed allocate memory pressure event source, ignoring: %m"); + log_debug_errno(r, "Failed to allocate memory pressure event source, ignoring: %m"); r = sd_bus_default_system(&m->bus); if (r < 0) diff --git a/src/test/test-bpf-foreign-programs.c b/src/test/test-bpf-foreign-programs.c index f2de3553dd..6ebd807326 100644 --- a/src/test/test-bpf-foreign-programs.c +++ b/src/test/test-bpf-foreign-programs.c @@ -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; diff --git a/src/test/test-bpf-restrict-fs.c b/src/test/test-bpf-restrict-fs.c index 29a1470dc6..8450750c19 100644 --- a/src/test/test-bpf-restrict-fs.c +++ b/src/test/test-bpf-restrict-fs.c @@ -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; diff --git a/src/test/test-btrfs.c b/src/test/test-btrfs.c index d81c129d65..b3fcf8068e 100644 --- a/src/test/test-btrfs.c +++ b/src/test/test-btrfs.c @@ -192,11 +192,11 @@ int main(int argc, char *argv[]) { r = btrfs_subvol_remove("/xxxquotatest", BTRFS_REMOVE_QUOTA|BTRFS_REMOVE_RECURSIVE); if (r < 0) - log_error_errno(r, "Failed remove subvolume: %m"); + log_error_errno(r, "Failed to remove subvolume: %m"); r = btrfs_subvol_remove("/xxxquotatest2", BTRFS_REMOVE_QUOTA|BTRFS_REMOVE_RECURSIVE); if (r < 0) - log_error_errno(r, "Failed remove subvolume: %m"); + log_error_errno(r, "Failed to remove subvolume: %m"); return 0; } diff --git a/src/test/test-loop-block.c b/src/test/test-loop-block.c index a1fdac63e5..4651998ef1 100644 --- a/src/test/test-loop-block.c +++ b/src/test/test-loop-block.c @@ -90,7 +90,7 @@ static void* thread_func(void *ptr) { DISSECT_IMAGE_READ_ONLY|DISSECT_IMAGE_ADD_PARTITION_DEVICES|DISSECT_IMAGE_PIN_PARTITION_DEVICES, &dissected); if (r < 0) - log_error_errno(r, "Failed dissect loopback device %s: %m", loop->node); + log_error_errno(r, "Failed to dissect loopback device %s: %m", loop->node); assert_se(r >= 0); log_info("Dissected loop device %s", loop->node); diff --git a/src/test/test-socket-bind.c b/src/test/test-socket-bind.c index fec8269f2b..4e4fdbedd0 100644 --- a/src/test/test-socket-bind.c +++ b/src/test/test-socket-bind.c @@ -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; diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index 012b61d513..6351179a62 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -1143,7 +1143,7 @@ int manager_new(Manager **ret) { r = sd_event_add_memory_pressure(m->event, NULL, NULL, NULL); if (r < 0) - log_debug_errno(r, "Failed allocate memory pressure event source, ignoring: %m"); + log_debug_errno(r, "Failed to allocate memory pressure event source, ignoring: %m"); r = sd_event_set_watchdog(m->event, true); if (r < 0) diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c index 59ee406f49..280403a8c5 100644 --- a/src/udev/net/link-config.c +++ b/src/udev/net/link-config.c @@ -661,7 +661,7 @@ static int link_generate_new_hw_addr(Link *link, struct hw_addr_data *ret) { memcpy(p, &result, len); if (!hw_addr_is_valid(link, &hw_addr)) return log_link_warning_errno(link, SYNTHETIC_ERRNO(EINVAL), - "Could not generate valid persistent MAC address: %m"); + "Could not generate valid persistent MAC address."); } finalize: diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index e3d8a3175d..36691b1f2d 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -539,7 +539,7 @@ static int get_device_firmware_node_sun(sd_device *dev, uint32_t *ret) { if (r < 0) return log_device_debug_errno(dev, r, "Failed to parse firmware_node/sun '%s', ignoring: %m", attr); if (sun == 0) - return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL), "firmware_node/sun == 0, ignoring: %m"); + return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL), "firmware_node/sun == 0, ignoring."); *ret = sun; return 0; diff --git a/src/udev/udev-manager.c b/src/udev/udev-manager.c index 34032184c6..bdde7ad6c1 100644 --- a/src/udev/udev-manager.c +++ b/src/udev/udev-manager.c @@ -861,7 +861,7 @@ static int event_enter_locked(Event *event, const char *whole_disk) { if (isempty(whole_disk)) return log_device_warning_errno( dev, SYNTHETIC_ERRNO(EBADMSG), - "Unexpected notify message received, skipping event (SEQNUM=%"PRIu64", ACTION=%s): %m", + "Unexpected notify message received, skipping event (SEQNUM=%"PRIu64", ACTION=%s).", event->seqnum, strna(device_action_to_string(event->action))); _cleanup_free_ char *whole_disk_copy = strdup(whole_disk); diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index b7fc0a675c..1f99b54a0d 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -954,7 +954,7 @@ static int parse_token( if (is_case_insensitive) return log_line_invalid_prefix(rule_line, key); - r = rule_line_add_token(rule_line, TK_M_PROGRAM, op, value, NULL, /* is_case_insensitive */ false, token_str); + r = rule_line_add_token(rule_line, TK_M_PROGRAM, op, value, NULL, /* is_case_insensitive = */ false, token_str); } else if (streq(key, "IMPORT")) { if (isempty(attr)) return log_line_invalid_attr(rule_line, key); diff --git a/src/userdb/userdbctl.c b/src/userdb/userdbctl.c index 0c36671417..f16d835f8a 100644 --- a/src/userdb/userdbctl.c +++ b/src/userdb/userdbctl.c @@ -490,7 +490,7 @@ static int display_user(int argc, char *argv[], void *userdata) { if (r == -EHOSTDOWN) return log_error_errno(r, "Selected user database service is not available for this request."); if (r < 0) - return log_error_errno(r, "Failed acquire next user: %m"); + return log_error_errno(r, "Failed to acquire next user: %m"); if (draw_separator && arg_output == OUTPUT_FRIENDLY) putchar('\n'); @@ -830,7 +830,7 @@ static int display_group(int argc, char *argv[], void *userdata) { if (r == -EHOSTDOWN) return log_error_errno(r, "Selected group database service is not available for this request."); if (r < 0) - return log_error_errno(r, "Failed acquire next group: %m"); + return log_error_errno(r, "Failed to acquire next group: %m"); if (draw_separator && arg_output == OUTPUT_FRIENDLY) putchar('\n'); @@ -977,7 +977,7 @@ static int display_memberships(int argc, char *argv[], void *userdata) { if (r == -EHOSTDOWN) return log_error_errno(r, "Selected membership database service is not available for this request."); if (r < 0) - return log_error_errno(r, "Failed acquire next membership: %m"); + return log_error_errno(r, "Failed to acquire next membership: %m"); r = show_membership(user, group, table); if (r < 0) @@ -1004,7 +1004,7 @@ static int display_memberships(int argc, char *argv[], void *userdata) { if (r == -EHOSTDOWN) return log_error_errno(r, "Selected membership database service is not available for this request."); if (r < 0) - return log_error_errno(r, "Failed acquire next membership: %m"); + return log_error_errno(r, "Failed to acquire next membership: %m"); r = show_membership(user, group, table); if (r < 0) diff --git a/src/userdb/userdbd-manager.c b/src/userdb/userdbd-manager.c index 6e0d5e4a2a..1c62bb1697 100644 --- a/src/userdb/userdbd-manager.c +++ b/src/userdb/userdbd-manager.c @@ -103,7 +103,7 @@ int manager_new(Manager **ret) { r = sd_event_add_memory_pressure(m->event, NULL, NULL, NULL); if (r < 0) - log_debug_errno(r, "Failed allocate memory pressure event source, ignoring: %m"); + log_debug_errno(r, "Failed to allocate memory pressure event source, ignoring: %m"); r = sd_event_set_watchdog(m->event, true); if (r < 0) @@ -198,7 +198,7 @@ static int start_one_worker(Manager *m) { } r = invoke_callout_binary(SYSTEMD_USERWORK_PATH, STRV_MAKE(SYSTEMD_USERWORK_PATH, "xxxxxxxxxxxxxxxx")); /* With some extra space rename_process() can make use of */ - log_error_errno(r, "Failed start worker process: %m"); + log_error_errno(r, "Failed to start worker process: %m"); _exit(EXIT_FAILURE); } diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index 29276e556a..f8d9a21b2c 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -1616,7 +1616,7 @@ static int grow_image(const char *path, uint64_t size) { } if (ftruncate(fd, size) < 0) - return log_error_errno(errno, "Failed grow image file '%s' from %s to %s: %m", path, + return log_error_errno(errno, "Failed to grow image file '%s' from %s to %s: %m", path, FORMAT_BYTES(st.st_size), FORMAT_BYTES(size)); r = fsync_full(fd); @@ -2204,7 +2204,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) { else if (S_ISBLK(st.st_mode)) driver = "host_device"; else - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Expected regular file or block device, not '%s': %m", *drive); + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Expected regular file or block device, not '%s'.", *drive); r = strv_extendf(&cmdline, "driver=raw,cache.direct=off,cache.no-flush=on,file.driver=%s,file.filename=%s,node-name=vmspawn_extra_%zu", driver, escaped_drive, i); if (r < 0) @@ -2691,7 +2691,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) { r = sd_event_add_memory_pressure(event, NULL, NULL, NULL); if (r < 0) - log_debug_errno(r, "Failed allocate memory pressure event source, ignoring: %m"); + log_debug_errno(r, "Failed to allocate memory pressure event source, ignoring: %m"); /* Exit when the child exits */ r = event_add_child_pidref(event, /* ret= */ NULL, &child_pidref, WEXITED, on_child_exit, /* userdata= */ NULL);