various: do not include file names directly in error messages
git grep -l 'Failed to open /'|xargs sed -r -i 's|"Failed to open (/[^ ]+): %m"|"Failed to open %s: %m", "\1"|g' git grep -l $'Failed to open \'/'|xargs sed -r -i $'s|"Failed to open \'(/[^ ]+)\': %m"|"Failed to open %s: %m", "\\1"|g' git grep -l "Failed to open /"|xargs sed -r -i $'s|"Failed to open (/[^ ]+), ignoring: %m"|"Failed to open %s, ignoring: %m", "\\1"|g' + some manual fixups.
This commit is contained in:
@@ -1040,7 +1040,7 @@ static int display_services(int argc, char *argv[], void *userdata) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return log_error_errno(errno, "Failed to open /run/systemd/userdb/: %m");
|
||||
return log_error_errno(errno, "Failed to open %s: %m", "/run/systemd/userdb/");
|
||||
}
|
||||
|
||||
t = table_new("service", "listening");
|
||||
@@ -1461,7 +1461,7 @@ static int load_credentials(int argc, char *argv[], void *userdata) {
|
||||
/* xopen_flags= */ XO_LABEL,
|
||||
/* mode= */ 0755);
|
||||
if (userdb_dir_fd < 0)
|
||||
return log_error_errno(userdb_dir_fd, "Failed to open '/etc/userdb/': %m");
|
||||
return log_error_errno(userdb_dir_fd, "Failed to open %s: %m", "/etc/userdb/");
|
||||
|
||||
FOREACH_ARRAY(i, des->entries, des->n_entries) {
|
||||
struct dirent *de = *i;
|
||||
|
||||
Reference in New Issue
Block a user