[packages/lvm2] add device-mapper-dmsetup-deps-export.patch

glen glen at pld-linux.org
Fri May 17 23:23:26 CEST 2013


commit 14fc19884b63754a8e293a3854edebc96273c3e9
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat May 18 00:22:45 2013 +0300

    add device-mapper-dmsetup-deps-export.patch
    
    patch from the same suse package as 0a81c26

 device-mapper-dmsetup-deps-export.patch | 53 +++++++++++++++++++++++++++++++++
 lvm2.spec                               |  2 ++
 2 files changed, 55 insertions(+)
---
diff --git a/lvm2.spec b/lvm2.spec
index 4758cbb..f3d5cdd 100644
--- a/lvm2.spec
+++ b/lvm2.spec
@@ -52,6 +52,7 @@ Patch5:		%{name}-wrapper.patch
 Patch6:		%{name}-lvm_path.patch
 Patch7:		%{name}-sd_notify.patch
 Patch8:		%{name}-clvmd_cmd_timeout.patch
+Patch9:		device-mapper-dmsetup-deps-export.patch
 URL:		http://sources.redhat.com/lvm2/
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
@@ -265,6 +266,7 @@ potrzeby initrd.
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 # do not force --export-symbol linker option for e.g. statically linked executables
 # -rdynamic compiler option drives linker in the right way.
diff --git a/device-mapper-dmsetup-deps-export.patch b/device-mapper-dmsetup-deps-export.patch
new file mode 100644
index 0000000..fbf59e3
--- /dev/null
+++ b/device-mapper-dmsetup-deps-export.patch
@@ -0,0 +1,53 @@
+---
+ tools/dmsetup.c |   23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+Index: LVM2.2.02.98/tools/dmsetup.c
+===================================================================
+--- LVM2.2.02.98.orig/tools/dmsetup.c
++++ LVM2.2.02.98/tools/dmsetup.c
+@@ -1717,10 +1717,11 @@ static int _export(CMD_ARGS)
+ 	char *target_type = NULL;
+ 	char *params;
+ 	const char *name = NULL;
+ 	const char *uuid = NULL;
+ 	struct dm_info info;
++	struct dm_deps *deps;
+ 
+ 	if (names)
+ 		name = names->name;
+ 	else if (argc == 2)
+ 		name = argv[1];
+@@ -1786,10 +1787,32 @@ static int _export(CMD_ARGS)
+ 				printf(",%s", target_type);
+ 		}
+ 		printf("\n");
+ 	}
+ 
++	dm_task_destroy(dmt);
++
++	if (!(dmt = dm_task_create(DM_DEVICE_DEPS)))
++		goto out;
++
++	name = NULL;
++	if (names)
++		name = names->name;
++	else if (argc == 2)
++		name = argv[1];
++
++	if (!_set_task_device(dmt, name, 0))
++		goto out;
++
++	if (!dm_task_run(dmt))
++		goto out;
++
++	if (!(deps = dm_task_get_deps(dmt)))
++		goto out;
++
++	printf("DM_DEPS=%d\n", deps->count);
++
+ 	r = 1;
+       out:
+ 	if (dmt)
+ 		dm_task_destroy(dmt);
+ 	return r;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lvm2.git/commitdiff/14fc19884b63754a8e293a3854edebc96273c3e9



More information about the pld-cvs-commit mailing list