SHA256
1
0
forked from pool/lvm2
lvm2/device-mapper-dmsetup-deps-export.patch

36 lines
762 B
Diff
Raw Normal View History

Index: LVM2.2.02.45/tools/dmsetup.c
===================================================================
--- LVM2.2.02.45.orig/tools/dmsetup.c 2009-04-27 17:46:16.000000000 +0800
+++ LVM2.2.02.45/tools/dmsetup.c 2009-04-27 17:58:50.000000000 +0800
@@ -1087,6 +1087,7 @@
const char *name = NULL;
const char *uuid = NULL;
struct dm_info info;
+ struct dm_deps *deps;
if (data)
name = names->name;
@@ -1156,6 +1157,22 @@
printf("\n");
}
+ dm_task_destroy(dmt);
+
+ if (!(dmt = dm_task_create(DM_DEVICE_DEPS)))
+ goto out;
+
+ 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)