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;
}
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"));
* 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;
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);
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;
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) {
#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;
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
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.");
_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)
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
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)
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;
}
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;
}
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);
* 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)
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;
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;
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)
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)
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);
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);
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);
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)
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),
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;
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);
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)
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 */
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:
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;
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);
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)