1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-02 09:47:03 +03:00

shared/loop-util: operate on the right fd

'loop' is always -1 at this point in the code.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-12-06 10:39:14 +01:00
parent 14bb274d3f
commit 1163a2e98a

View File

@ -44,7 +44,7 @@ int loop_device_make_full(
return -errno;
if (S_ISBLK(st.st_mode)) {
if (ioctl(loop, LOOP_GET_STATUS64, &info) >= 0) {
if (ioctl(fd, LOOP_GET_STATUS64, &info) >= 0) {
/* Oh! This is a loopback device? That's interesting! */
#if HAVE_VALGRIND_MEMCHECK_H