diff options
Diffstat (limited to '0072-RHBZ-1039199-check-loop-control.patch')
-rw-r--r-- | 0072-RHBZ-1039199-check-loop-control.patch | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/0072-RHBZ-1039199-check-loop-control.patch b/0072-RHBZ-1039199-check-loop-control.patch index 73d6f88..21bd0c3 100644 --- a/0072-RHBZ-1039199-check-loop-control.patch +++ b/0072-RHBZ-1039199-check-loop-control.patch @@ -1,6 +1,6 @@ --- - kpartx/lopart.c | 17 +++++++++++++++-- - 1 file changed, 15 insertions(+), 2 deletions(-) + kpartx/lopart.c | 18 ++++++++++++++++-- + 1 file changed, 16 insertions(+), 2 deletions(-) Index: multipath-tools-130222/kpartx/lopart.c =================================================================== @@ -17,7 +17,7 @@ Index: multipath-tools-130222/kpartx/lopart.c #if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) \ && !defined (__s390x__) #define int2ptr(x) ((void *) ((int) x)) -@@ -140,14 +144,23 @@ find_unused_loop_device (void) +@@ -140,14 +144,24 @@ find_unused_loop_device (void) char dev[20]; char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" }; @@ -30,9 +30,10 @@ Index: multipath-tools-130222/kpartx/lopart.c + if (stat("/dev/loop-control", &statbuf) == 0 && + S_ISCHR(statbuf.st_mode)) { + fd = open("/dev/loop-control", O_RDWR); -+ if (fd >= 0) ++ if (fd >= 0) { + first = ioctl(fd, LOOP_CTL_GET_FREE); -+ close(fd); ++ close(fd); ++ } + if (first < 0) + first = 0; + } |