1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-05 08:58:21 +03:00

Merge pull request from keszybz/log-errno-fix

Log errno fix
This commit is contained in:
Yu Watanabe 2023-02-07 12:07:45 +09:00 committed by GitHub
commit 5746c82968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5108,7 +5108,7 @@ static int resolve_copy_blocks_auto(
continue;
}
if (major(sl) == 0) {
log_debug_errno(r, "Device backing %s is special, ignoring: %m", q);
log_debug("Device backing %s is special, ignoring.", q);
continue;
}
@ -5183,11 +5183,12 @@ static int context_open_copy_block_paths(
"Copying from block device node is not permitted in --image=/--root= mode, refusing.");
} else if (p->copy_blocks_auto) {
dev_t devno;
dev_t devno = 0; /* Fake initialization to appease gcc. */
r = resolve_copy_blocks_auto(p->type, p->copy_blocks_root, restrict_devno, &devno, &uuid);
if (r < 0)
return r;
assert(devno != 0);
source_fd = r = device_open_from_devnum(S_IFBLK, devno, O_RDONLY|O_CLOEXEC|O_NONBLOCK, &opened);
if (r < 0)