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:
@@ -43,7 +43,7 @@ static int builtin_btrfs(UdevEvent *event, int argc, char *argv[]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return log_device_debug_errno(dev, errno, "Failed to open /dev/btrfs-control: %m");
|
||||
return log_device_debug_errno(dev, errno, "Failed to open %s: %m", "/dev/btrfs-control");
|
||||
}
|
||||
|
||||
struct btrfs_ioctl_vol_args args = {};
|
||||
|
||||
@@ -415,7 +415,7 @@ static int udev_watch_clear_by_wd(sd_device *dev, int dirfd, int wd) {
|
||||
if (dirfd < 0) {
|
||||
dirfd_close = RET_NERRNO(open("/run/udev/watch/", O_CLOEXEC | O_DIRECTORY | O_NOFOLLOW | O_RDONLY));
|
||||
if (dirfd_close < 0)
|
||||
return log_device_debug_errno(dev, dirfd_close, "Failed to open '/run/udev/watch/': %m");
|
||||
return log_device_debug_errno(dev, dirfd_close, "Failed to open %s: %m", "/run/udev/watch/");
|
||||
|
||||
dirfd = dirfd_close;
|
||||
}
|
||||
@@ -595,7 +595,7 @@ int manager_remove_watch(Manager *manager, sd_device *dev) {
|
||||
if (dirfd == -ENOENT)
|
||||
return 0;
|
||||
if (dirfd < 0)
|
||||
return log_device_debug_errno(dev, dirfd, "Failed to open '/run/udev/watch/': %m");
|
||||
return log_device_debug_errno(dev, dirfd, "Failed to open %s: %m", "/run/udev/watch/");
|
||||
|
||||
/* First, clear symlinks. */
|
||||
r = udev_watch_clear(dev, dirfd, &wd);
|
||||
|
||||
Reference in New Issue
Block a user