tree-wide: several fixlets for log message and comment (#38263)

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2025-07-23 10:17:33 +02:00
committed by GitHub
88 changed files with 134 additions and 135 deletions
+2 -2
View File
@@ -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");
}
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -127,7 +127,7 @@ int check_password_quality(
check_reason = sym_passwdqc_check(&params->qc, password, old, &pw);
} else
check_reason = sym_passwdqc_check(&params->qc, password, old, /* pw */ NULL);
check_reason = sym_passwdqc_check(&params->qc, password, old, /* pw = */ NULL);
if (check_reason) {
if (ret_error) {
+2 -2
View File
@@ -1538,7 +1538,7 @@ int seccomp_protect_syslog(void) {
0);
if (r < 0) {
log_debug_errno(r, "Failed to add syslog() rule for architecture %s, skipping %m", seccomp_arch_to_string(arch));
log_debug_errno(r, "Failed to add syslog() rule for architecture %s, skipping: %m", seccomp_arch_to_string(arch));
continue;
}
@@ -1546,7 +1546,7 @@ int seccomp_protect_syslog(void) {
if (ERRNO_IS_NEG_SECCOMP_FATAL(r))
return r;
if (r < 0)
log_debug_errno(r, "Failed to install syslog protection rules for architecture %s, skipping %m",
log_debug_errno(r, "Failed to install syslog protection rules for architecture %s, skipping: %m",
seccomp_arch_to_string(arch));
}
+1 -1
View File
@@ -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);
+3 -3
View File
@@ -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)