From 1163a2e98a89335c2a9151d48c1f318765e74a18 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 6 Dec 2019 10:39:14 +0100 Subject: [PATCH] shared/loop-util: operate on the right fd 'loop' is always -1 at this point in the code. --- src/shared/loop-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/loop-util.c b/src/shared/loop-util.c index acf3eae2d72..05b0d51d979 100644 --- a/src/shared/loop-util.c +++ b/src/shared/loop-util.c @@ -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 -- 2.47.3