]> git.pld-linux.org Git - packages/lvm2.git/blame - device-mapper-dmsetup-deps-export.patch
- up to 2.03.08
[packages/lvm2.git] / device-mapper-dmsetup-deps-export.patch
CommitLineData
14fc1988 1---
bac719c6 2 libdm/dm-tools/dmsetup.c | 23 +++++++++++++++++++++++
14fc1988
ER
3 1 file changed, 23 insertions(+)
4
bac719c6 5Index: LVM2.2.02.98/libdm/dm-tools/dmsetup.c
14fc1988 6===================================================================
bac719c6
AM
7--- LVM2.2.02.98.orig/libdm/dm-tools/dmsetup.c
8+++ LVM2.2.02.98/libdm/dm-tools/dmsetup.c
14fc1988
ER
9@@ -1717,10 +1717,11 @@ static int _export(CMD_ARGS)
10 char *target_type = NULL;
11 char *params;
12 const char *name = NULL;
13 const char *uuid = NULL;
14 struct dm_info info;
15+ struct dm_deps *deps;
16
17 if (names)
18 name = names->name;
19 else if (argc == 2)
20 name = argv[1];
21@@ -1786,10 +1787,32 @@ static int _export(CMD_ARGS)
22 printf(",%s", target_type);
23 }
24 printf("\n");
25 }
26
27+ dm_task_destroy(dmt);
28+
29+ if (!(dmt = dm_task_create(DM_DEVICE_DEPS)))
30+ goto out;
31+
32+ name = NULL;
33+ if (names)
34+ name = names->name;
35+ else if (argc == 2)
36+ name = argv[1];
37+
38+ if (!_set_task_device(dmt, name, 0))
39+ goto out;
40+
41+ if (!dm_task_run(dmt))
42+ goto out;
43+
44+ if (!(deps = dm_task_get_deps(dmt)))
45+ goto out;
46+
47+ printf("DM_DEPS=%d\n", deps->count);
48+
49 r = 1;
50 out:
51 if (dmt)
52 dm_task_destroy(dmt);
53 return r;
This page took 0.041732 seconds and 4 git commands to generate.