diff options
author | Dave Wysochanski <dwysocha@redhat.com> | 2010-10-12 16:13:06 +0000 |
---|---|---|
committer | Dave Wysochanski <dwysocha@redhat.com> | 2010-10-12 16:13:06 +0000 |
commit | 2eba846043b143d745b26e3a60658394cf3081e2 (patch) | |
tree | 363cf7486804f8a255ba6ef3676fe4cca9205543 /lib/metadata/lv.c | |
parent | d88090b0ae983577e3cf14909148514f627a2f98 (diff) | |
download | lvm2-2eba846043b143d745b26e3a60658394cf3081e2.tar.gz lvm2-2eba846043b143d745b26e3a60658394cf3081e2.tar.xz lvm2-2eba846043b143d745b26e3a60658394cf3081e2.zip |
Refactor and add code for (lv) 'modules' get function.
Diffstat (limited to 'lib/metadata/lv.c')
-rw-r--r-- | lib/metadata/lv.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c index 345f958b..634e21d0 100644 --- a/lib/metadata/lv.c +++ b/lib/metadata/lv.c @@ -18,6 +18,21 @@ #include "activate.h" #include "toolcontext.h" #include "segtype.h" +#include "str_list.h" + +char *lv_modules_dup(struct dm_pool *mem, const struct logical_volume *lv) +{ + struct dm_list *modules; + + if (!(modules = str_list_create(mem))) { + log_error("modules str_list allocation failed"); + return NULL; + } + + if (!list_lv_modules(mem, lv, modules)) + return_NULL; + return tags_format_and_copy(lv->vg->vgmem, modules); +} char *lv_mirror_log_dup(struct dm_pool *mem, const struct logical_volume *lv) { |