diff -urp LVM2.2.03.00.orig/libdm/dm-tools/dmsetup.c LVM2.2.03.00/libdm/dm-tools/dmsetup.c --- LVM2.2.03.00.orig/libdm/dm-tools/dmsetup.c 2018-10-21 14:36:09.255416609 +0000 +++ LVM2.2.03.00/libdm/dm-tools/dmsetup.c 2018-10-21 14:37:55.506416609 +0000 @@ -2568,6 +2568,7 @@ static int _export(CMD_ARGS) const char *name = NULL; const char *uuid = NULL; struct dm_info info; + struct dm_deps *deps; if (names) name = names->name; @@ -2637,6 +2638,28 @@ static int _export(CMD_ARGS) 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)