Merge pull request #24495 from poettering/loopback-block-msg

improve loopback warning message
This commit is contained in:
Yu Watanabe
2022-08-30 01:10:43 +09:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -284,7 +284,7 @@ static int loop_configure(
if (ioctl(fd, LOOP_SET_STATUS64, &info_copy) >= 0)
break;
if (errno != EAGAIN || ++n_attempts >= 64) {
r = log_debug_errno(errno, "Failed to configure loopback device: %m");
r = log_debug_errno(errno, "Failed to configure loopback block device: %m");
goto fail;
}
+2 -2
View File
@@ -208,10 +208,10 @@ int loopback_setup(void) {
/* If we lack the permissions to configure the loopback device,
* but we find it to be already configured, let's exit cleanly,
* in order to supported unprivileged containers. */
if (state_up.rcode == -EPERM && check_loopback(rtnl))
if (ERRNO_IS_PRIVILEGE(state_up.rcode) && check_loopback(rtnl))
return 0;
return log_warning_errno(state_up.rcode, "Failed to configure loopback device: %m");
return log_warning_errno(state_up.rcode, "Failed to configure loopback network device: %m");
}
return 0;