From: Zbigniew Jędrzejewski-Szmek Date: Fri, 6 Dec 2019 09:39:14 +0000 (+0100) Subject: shared/loop-util: operate on the right fd X-Git-Tag: v245-rc1~261^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1163a2e98a89335c2a9151d48c1f318765e74a18;p=thirdparty%2Fsystemd.git shared/loop-util: operate on the right fd 'loop' is always -1 at this point in the code. --- 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