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:
Zbigniew Jędrzejewski-Szmek
2025-06-02 11:10:38 +02:00
parent 3f1812180b
commit 42ba99748d
37 changed files with 55 additions and 55 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ int umount_recursive_full(const char *prefix, int flags, char **keep) {
f = fopen("/proc/self/mountinfo", "re"); /* Pin the file, in case we unmount /proc/ as part of the logic here */
if (!f)
return log_debug_errno(errno, "Failed to open /proc/self/mountinfo: %m");
return log_debug_errno(errno, "Failed to open %s: %m", "/proc/self/mountinfo");
for (;;) {
_cleanup_(mnt_free_tablep) struct libmnt_table *table = NULL;
@@ -454,7 +454,7 @@ int bind_remount_one(const char *path, unsigned long new_flags, unsigned long fl
proc_self_mountinfo = fopen("/proc/self/mountinfo", "re");
if (!proc_self_mountinfo)
return log_debug_errno(errno, "Failed to open /proc/self/mountinfo: %m");
return log_debug_errno(errno, "Failed to open %s: %m", "/proc/self/mountinfo");
return bind_remount_one_with_mountinfo(path, new_flags, flags_mask, proc_self_mountinfo);
}