mirror of
https://github.com/systemd/systemd
synced 2024-09-15 22:30:22 +00:00
Merge pull request #24495 from poettering/loopback-block-msg
improve loopback warning message
This commit is contained in:
commit
3c82f2028d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue