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...
This commit is contained in:
@@ -388,7 +388,7 @@ static int verb_status(int argc, char *argv[], void *userdata) {
|
||||
/* We didn't find any of the three? If so, let's try the next directory, before we give up. */
|
||||
}
|
||||
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EBUSY), "Couldn't determine boot state: %m");
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EBUSY), "Couldn't determine boot state.");
|
||||
}
|
||||
|
||||
static int verb_set(int argc, char *argv[], void *userdata) {
|
||||
@@ -479,8 +479,7 @@ static int verb_set(int argc, char *argv[], void *userdata) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
log_error_errno(SYNTHETIC_ERRNO(EBUSY), "Can't find boot counter source file for '%s': %m", target);
|
||||
return 1;
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EBUSY), "Can't find boot counter source file for '%s'.", target);
|
||||
|
||||
exists:
|
||||
log_debug("Operation already executed before, not doing anything.");
|
||||
|
||||
@@ -38,7 +38,7 @@ static int parse_timeout(const char *arg1, char16_t **ret_timeout, size_t *ret_t
|
||||
(void) efi_loader_get_features(&loader_features);
|
||||
if (!(loader_features & EFI_LOADER_FEATURE_MENU_DISABLE)) {
|
||||
if (!arg_graceful)
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Loader does not support 'menu-disabled': %m");
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Loader does not support 'menu-disabled'.");
|
||||
|
||||
log_warning("Loader does not support 'menu-disabled', setting anyway.");
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ int verb_status(int argc, char *argv[], void *userdata) {
|
||||
|
||||
const char *path = arg_dollar_boot_path();
|
||||
if (!path)
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EACCES), "Failed to determine XBOOTLDR location: %m");
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EACCES), "Failed to determine XBOOTLDR location.");
|
||||
|
||||
puts(path);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user