This patch fixes a bug where creating a Cluster Segment Manamger container with more than one disk returns error 22, Invalid argument. --- evms-2.3.1/plugins/csm/containers.c 2004-03-17 17:07:00.000000000 -0600 +++ evms-2.3.1-fix/plugins/csm/containers.c 2004-05-04 12:50:17.000000000 -0500 @@ -219,6 +219,7 @@ LOG_ENTRY(); REQUIRE(objects != NULL ); + REQUIRE(EngFncs->list_count != 0); REQUIRE(options != NULL ); REQUIRE(container != NULL); REQUIRE(csm_has_quorum == TRUE || csm_admin_mode == TRUE); @@ -231,19 +232,14 @@ LIST_FOR_EACH(objects, iter, ld) { rc = csm_assign( ld, options ); - if (rc==0) { - LIST_FOR_EACH(objects, iter, ld) { - if (ld->consuming_container) { - new_container = ld->consuming_container; - break; - } - } - } - else { + if (rc) { break; } } + ld = EngFncs->first_thing(objects, NULL); + new_container = ld->consuming_container; + if (rc && new_container != NULL) { csm_delete_container( new_container, NULL ); }