diff -ur LVM2.2.03.02.orig/libdm/dm-tools/dmsetup.c LVM2.2.03.02/libdm/dm-tools/dmsetup.c --- LVM2.2.03.02.orig/libdm/dm-tools/dmsetup.c 2019-03-22 17:08:18.345000000 +0100 +++ LVM2.2.03.02/libdm/dm-tools/dmsetup.c 2019-03-22 17:09:27.125000000 +0100 @@ -2562,6 +2562,7 @@ const char *name = NULL; const char *uuid = NULL; struct dm_info info; + struct dm_deps *deps; if (names) name = names->name; @@ -2631,6 +2632,28 @@ 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)