From: Yu Watanabe Date: Sat, 19 Jul 2025 00:45:29 +0000 (+0900) Subject: tree-wide: do not use %m with SYNTHETIC_ERRNO() X-Git-Tag: v258-rc1~9^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f6086d530e7e205c3fd244ec3d58372c6fb1eb4;p=thirdparty%2Fsystemd.git tree-wide: do not use %m with SYNTHETIC_ERRNO() --- diff --git a/src/basic/conf-files.c b/src/basic/conf-files.c index 2e4f28ba886..b1b0c746376 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 e15004981bf..0c9f52685b3 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 9b2dc08d612..9c717ace9d8 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/bootctl/bootctl-random-seed.c b/src/bootctl/bootctl-random-seed.c index 4d0e50d6004..a9826ca9e6b 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 dc8b976b7f0..0c66ae06308 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/exec-invoke.c b/src/core/exec-invoke.c index 82a6a12a984..dbac2958243 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/selinux-setup.c b/src/core/selinux-setup.c index 560c837b2b6..db14db88ee3 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/home/homectl.c b/src/home/homectl.c index 75235e1f40d..329572fb345 100644 --- a/src/home/homectl.c +++ b/src/home/homectl.c @@ -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-luks.c b/src/home/homework-luks.c index e1b173a5855..211c88aacac 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 diff --git a/src/import/import-generator.c b/src/import/import-generator.c index 176ee7cb8a2..7b4a96f8a7c 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 ecabf61e9ef..5f3a04a7529 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/journal/journald-client.c b/src/journal/journald-client.c index 659b9c5e88f..6641c09336d 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/libsystemd-network/sd-ndisc-redirect.c b/src/libsystemd-network/sd-ndisc-redirect.c index 1637ad36a22..4845adbd7bb 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 2b40ea77a3c..7f94c7aeb0f 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 73e86bb78c8..1e4899c3560 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-varlink/sd-varlink.c b/src/libsystemd/sd-varlink/sd-varlink.c index 1e70ce41a7c..7679cc11e57 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/network/generator/network-generator.c b/src/network/generator/network-generator.c index 31c1a2f723a..dcb8bb3cd3b 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 ff5d156a66e..7f6ce3ed3de 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/wait-online/wait-online-link.c b/src/network/wait-online/wait-online-link.c index 3b7e336a7df..83904ac31ab 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-network.c b/src/nspawn/nspawn-network.c index 4282bae233b..50ffffdd3ca 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/shared/dissect-image.c b/src/shared/dissect-image.c index 024e16d68bf..ac3c92147ed 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) diff --git a/src/shared/find-esp.c b/src/shared/find-esp.c index 639076384ea..eeec050b60d 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/varlink-serialize.c b/src/shared/varlink-serialize.c index c7e6c5c4030..906a1020dec 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 f5f57180328..0d17459d6ff 100644 --- a/src/sysext/sysext.c +++ b/src/sysext/sysext.c @@ -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/udev/net/link-config.c b/src/udev/net/link-config.c index 59ee406f494..280403a8c5f 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 e3d8a3175d8..36691b1f2da 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 34032184c6c..bdde7ad6c15 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/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index e3e7a7c40c7..f8d9a21b2c5 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -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)