summaryrefslogtreecommitdiffstats
path: root/0072-RHBZ-1039199-check-loop-control.patch
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2014-01-10 08:52:50 -0600
committerBenjamin Marzinski <bmarzins@redhat.com>2014-01-10 08:52:50 -0600
commit89d1eb6bd1fb4243f3872bc6d2801e0902d655d2 (patch)
tree46112bb43e69a8e102df097eddfa62ad875911a0 /0072-RHBZ-1039199-check-loop-control.patch
parentedb91e14b08cebb04a53655b54e2fbc41be4ab74 (diff)
downloaddevice-mapper-multipath-89d1eb6bd1fb4243f3872bc6d2801e0902d655d2.tar.gz
device-mapper-multipath-89d1eb6bd1fb4243f3872bc6d2801e0902d655d2.tar.xz
device-mapper-multipath-89d1eb6bd1fb4243f3872bc6d2801e0902d655d2.zip
device-mapper-multipath-0.4.9-62
Modify 0072-RHBZ-1039199-check-loop-control.patch * only call close on the /dev/loop-control fd the open succeeds Add 0073-RH-update-build-flags.patch * fix print call to work with -Werror=format-security compile flag
Diffstat (limited to '0072-RHBZ-1039199-check-loop-control.patch')
-rw-r--r--0072-RHBZ-1039199-check-loop-control.patch11
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;
+ }