summaryrefslogtreecommitdiffstats
path: root/lib/commands
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2011-08-24 13:41:46 +0000
committerAlasdair Kergon <agk@redhat.com>2011-08-24 13:41:46 +0000
commitf9b92564a7500bffac953ed25a3b7a5207a99c27 (patch)
tree7cd6e90270ad13383aba15ab0c275da7864ed60f /lib/commands
parent3ba4a19510112d0e7fd97ef29767ec0f6e0250ff (diff)
downloadlvm2-f9b92564a7500bffac953ed25a3b7a5207a99c27.tar.gz
lvm2-f9b92564a7500bffac953ed25a3b7a5207a99c27.tar.xz
lvm2-f9b92564a7500bffac953ed25a3b7a5207a99c27.zip
Fix raid shared lib segtype registration (2.02.87).
Diffstat (limited to 'lib/commands')
-rw-r--r--lib/commands/toolcontext.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 3cbd29d2..520e2604 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -994,24 +994,17 @@ static int _init_segtypes(struct cmd_context *cmd)
{
int i;
struct segment_type *segtype;
- struct segtype_library seglib = { .cmd = cmd };
+ struct segtype_library seglib = { .cmd = cmd, .lib = NULL };
struct segment_type *(*init_segtype_array[])(struct cmd_context *cmd) = {
init_striped_segtype,
init_zero_segtype,
init_error_segtype,
init_free_segtype,
-#ifdef RAID_INTERNAL
- init_raid1_segtype,
- init_raid4_segtype,
- init_raid5_segtype,
- init_raid5_la_segtype,
- init_raid5_ra_segtype,
- init_raid5_ls_segtype,
- init_raid5_rs_segtype,
- init_raid6_segtype,
- init_raid6_zr_segtype,
- init_raid6_nr_segtype,
- init_raid6_nc_segtype,
+#ifdef SNAPSHOT_INTERNAL
+ init_snapshot_segtype,
+#endif
+#ifdef MIRRORED_INTERNAL
+ init_mirrored_segtype,
#endif
NULL
};
@@ -1027,22 +1020,13 @@ static int _init_segtypes(struct cmd_context *cmd)
dm_list_add(&cmd->segtypes, &segtype->list);
}
-#ifdef SNAPSHOT_INTERNAL
- if (!(segtype = init_snapshot_segtype(cmd)))
- return 0;
- segtype->library = NULL;
- dm_list_add(&cmd->segtypes, &segtype->list);
-#endif
-
-#ifdef MIRRORED_INTERNAL
- if (!(segtype = init_mirrored_segtype(cmd)))
+#ifdef REPLICATOR_INTERNAL
+ if (!init_replicator_segtype(cmd, &seglib))
return 0;
- segtype->library = NULL;
- dm_list_add(&cmd->segtypes, &segtype->list);
#endif
-#ifdef REPLICATOR_INTERNAL
- if (!init_replicator_segtype(&seglib))
+#ifdef RAID_INTERNAL
+ if (!init_raid_segtypes(cmd, &seglib))
return 0;
#endif