]> TLD Linux GIT Repositories - packages/lvm2.git/blob - device-mapper-dmsetup-deps-export.patch
- updated to 2.03.02
[packages/lvm2.git] / device-mapper-dmsetup-deps-export.patch
1 diff -ur LVM2.2.03.02.orig/libdm/dm-tools/dmsetup.c LVM2.2.03.02/libdm/dm-tools/dmsetup.c
2 --- LVM2.2.03.02.orig/libdm/dm-tools/dmsetup.c  2019-03-22 17:08:18.345000000 +0100
3 +++ LVM2.2.03.02/libdm/dm-tools/dmsetup.c       2019-03-22 17:09:27.125000000 +0100
4 @@ -2562,6 +2562,7 @@
5         const char *name = NULL;
6         const char *uuid = NULL;
7         struct dm_info info;
8 +       struct dm_deps *deps;
9  
10         if (names)
11                 name = names->name;
12 @@ -2631,6 +2632,28 @@
13                 printf("\n");
14         }
15  
16 +       dm_task_destroy(dmt);
17 +
18 +       if (!(dmt = dm_task_create(DM_DEVICE_DEPS)))
19 +               goto out;
20 +
21 +       name = NULL;
22 +       if (names)
23 +               name = names->name;
24 +       else if (argc == 2)
25 +               name = argv[1];
26 +
27 +       if (!_set_task_device(dmt, name, 0))
28 +               goto out;
29 +
30 +       if (!dm_task_run(dmt))
31 +               goto out;
32 +
33 +       if (!(deps = dm_task_get_deps(dmt)))
34 +               goto out;
35 +
36 +       printf("DM_DEPS=%d\n", deps->count);
37 +
38         r = 1;
39        out:
40         if (dmt)