device-mapper-multipath-0.4.9-54
Add 0047-RHBZ-980777-kpartx-read-only-loop-devs.patch * make kpartx support read-only files better Resolves: bz #980777
This commit is contained in:
parent
d92c85e91a
commit
924a2dabc4
39
0047-RHBZ-980777-kpartx-read-only-loop-devs.patch
Normal file
39
0047-RHBZ-980777-kpartx-read-only-loop-devs.patch
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
kpartx/kpartx.c | 3 +--
|
||||
kpartx/lopart.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: multipath-tools-130222/kpartx/kpartx.c
|
||||
===================================================================
|
||||
--- multipath-tools-130222.orig/kpartx/kpartx.c
|
||||
+++ multipath-tools-130222/kpartx/kpartx.c
|
||||
@@ -204,7 +204,6 @@ main(int argc, char **argv){
|
||||
char * delim = NULL;
|
||||
char *uuid = NULL;
|
||||
char *mapname = NULL;
|
||||
- int loopro = 0;
|
||||
int hotplug = 0;
|
||||
int loopcreated = 0;
|
||||
struct stat buf;
|
||||
@@ -315,7 +314,7 @@ main(int argc, char **argv){
|
||||
if (!loopdev) {
|
||||
loopdev = find_unused_loop_device();
|
||||
|
||||
- if (set_loop(loopdev, device, 0, &loopro)) {
|
||||
+ if (set_loop(loopdev, device, 0, &ro)) {
|
||||
fprintf(stderr, "can't set up loop\n");
|
||||
exit (1);
|
||||
}
|
||||
Index: multipath-tools-130222/kpartx/lopart.c
|
||||
===================================================================
|
||||
--- multipath-tools-130222.orig/kpartx/lopart.c
|
||||
+++ multipath-tools-130222/kpartx/lopart.c
|
||||
@@ -230,7 +230,7 @@ set_loop (const char *device, const char
|
||||
|
||||
if ((ffd = open (file, mode)) < 0) {
|
||||
|
||||
- if (!*loopro && errno == EROFS)
|
||||
+ if (!*loopro && (errno == EROFS || errno == EACCES))
|
||||
ffd = open (file, mode = O_RDONLY);
|
||||
|
||||
if (ffd < 0) {
|
@ -1,7 +1,7 @@
|
||||
Summary: Tools to manage multipath devices using device-mapper
|
||||
Name: device-mapper-multipath
|
||||
Version: 0.4.9
|
||||
Release: 53%{?dist}
|
||||
Release: 54%{?dist}
|
||||
License: GPL+
|
||||
Group: System Environment/Base
|
||||
URL: http://christophe.varoqui.free.fr/
|
||||
@ -54,6 +54,7 @@ Patch0043: 0043-RH-signal-waiter.patch
|
||||
Patch0044: 0044-RHBZ-976688-fix-wipe-wwids.patch
|
||||
Patch0045: 0045-RHBZ-977297-man-page-fix.patch
|
||||
Patch0046: 0046-RHBZ-883981-move-udev-rules.patch
|
||||
Patch0047: 0047-RHBZ-980777-kpartx-read-only-loop-devs.patch
|
||||
|
||||
# runtime
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
@ -152,6 +153,7 @@ kpartx manages partition creation and removal for device-mapper devices.
|
||||
%patch0044 -p1
|
||||
%patch0045 -p1
|
||||
%patch0046 -p1
|
||||
%patch0047 -p1
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
@ -245,6 +247,11 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
|
||||
%{_mandir}/man8/kpartx.8.gz
|
||||
|
||||
%changelog
|
||||
* Fri Jul 5 2013 Benjamin Marzinski <bmarzins@redhat.com> 0.4.9-54
|
||||
- Add 0047-RHBZ-980777-kpartx-read-only-loop-devs.patch
|
||||
* make kpartx support read-only files better
|
||||
- Resolves: bz #980777
|
||||
|
||||
* Wed Jul 3 2013 Benjamin Marzinski <bmarzins@redhat.com> 0.4.9-53
|
||||
- Add 0044-RHBZ-976688-fix-wipe-wwids.patch
|
||||
* Seek back to the start of the file after truncating it
|
||||
|
Loading…
Reference in New Issue
Block a user