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:
@@ -365,7 +365,7 @@ static int manager_etc_hosts_read(Manager *m) {
|
||||
f = fopen("/etc/hosts", "re");
|
||||
if (!f) {
|
||||
if (errno != ENOENT)
|
||||
return log_error_errno(errno, "Failed to open /etc/hosts: %m");
|
||||
return log_error_errno(errno, "Failed to open %s: %m", "/etc/hosts");
|
||||
|
||||
manager_etc_hosts_flush(m);
|
||||
return 0;
|
||||
|
||||
@@ -106,7 +106,7 @@ int manager_read_resolv_conf(Manager *m) {
|
||||
if (errno == ENOENT)
|
||||
return 0;
|
||||
|
||||
r = log_warning_errno(errno, "Failed to open /etc/resolv.conf: %m");
|
||||
r = log_warning_errno(errno, "Failed to open %s: %m", "/etc/resolv.conf");
|
||||
goto clear;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user