summaryrefslogtreecommitdiffstats
path: root/src/cryptenroll
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-04-30 15:54:12 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-04-30 21:41:06 +0200
commit4e494e6aace40a356e646414b48f32c49ec7bbd8 (patch)
tree72b338f5285d0078c24446f301302e2ba6d8dab8 /src/cryptenroll
parentbuild-path: fix SIGSEGV on RISC-V and MIPS (diff)
downloadsystemd-4e494e6aace40a356e646414b48f32c49ec7bbd8.tar.xz
systemd-4e494e6aace40a356e646414b48f32c49ec7bbd8.zip
tree-wise: several cleanups for logging
- drop unnecessary SYNTHETIC_ERRNO() when the logger does not propagate error code, - drop unnecessary '%m' in error message when the error code is specified with SYNTHETIC_ERRNO(), - add missing full stop at the end of log message, - use RET_GATHER(), - add missing ", ignoring.", - upeercase the first letter, etc., etc...
Diffstat (limited to 'src/cryptenroll')
-rw-r--r--src/cryptenroll/cryptenroll-pkcs11.c4
-rw-r--r--src/cryptenroll/cryptenroll.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/cryptenroll/cryptenroll-pkcs11.c b/src/cryptenroll/cryptenroll-pkcs11.c
index 09875c1598..1e4be008e3 100644
--- a/src/cryptenroll/cryptenroll-pkcs11.c
+++ b/src/cryptenroll/cryptenroll-pkcs11.c
@@ -21,10 +21,10 @@ static int uri_set_private_class(const char *uri, char **ret_uri) {
CK_ATTRIBUTE attribute = { CKA_CLASS, &class, sizeof(class) };
if (sym_p11_kit_uri_set_attribute(p11kit_uri, &attribute) != P11_KIT_URI_OK)
- return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to set class for URI '%s': %m", uri);
+ return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to set class for URI '%s'.", uri);
if (sym_p11_kit_uri_format(p11kit_uri, P11_KIT_URI_FOR_ANY, &private_uri) != P11_KIT_URI_OK)
- return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to format PKCS#11 URI: %m");
+ return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to format PKCS#11 URI.");
}
*ret_uri = TAKE_PTR(private_uri);
diff --git a/src/cryptenroll/cryptenroll.c b/src/cryptenroll/cryptenroll.c
index 2083641897..9c618ad28a 100644
--- a/src/cryptenroll/cryptenroll.c
+++ b/src/cryptenroll/cryptenroll.c
@@ -143,7 +143,7 @@ static int determine_default_node(void) {
return log_error_errno(r, "Unable to query DM_UUID udev property of backing block device for /var/: %m");
if (!startswith(dm_uuid, "CRYPT-LUKS2-"))
- return log_error_errno(SYNTHETIC_ERRNO(ENXIO), "Block device backing /var/ is not a LUKS2 device: %m");
+ return log_error_errno(SYNTHETIC_ERRNO(ENXIO), "Block device backing /var/ is not a LUKS2 device.");
_cleanup_(sd_device_unrefp) sd_device *origin = NULL;
r = block_device_get_originating(dev, &origin);