From: Theodore Ts'o Date: Sun, 2 Jun 2002 01:48:24 +0000 (-0400) Subject: fs_ext2.c (fs_init_task): Fix minor bugs pointed out by Steve X-Git-Tag: E2FSPROGS-1.28-WIP-0626~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26bfdca8f2f538bba26e44c1f4c6527ab229586f;p=thirdparty%2Fe2fsprogs.git fs_ext2.c (fs_init_task): Fix minor bugs pointed out by Steve Pratt. Fixed a selection bug and added checks to make sure volumes are not mounted when creating the list of volumes which can be mkfs'ed by the ext2/3 plugin. --- diff --git a/lib/evms/ChangeLog b/lib/evms/ChangeLog index a977ce8ca..bc3534096 100644 --- a/lib/evms/ChangeLog +++ b/lib/evms/ChangeLog @@ -1,3 +1,10 @@ +2002-06-01 + + * fs_ext2.c (fs_init_task): Fix minor bugs pointed out by Steve + Pratt. Fixed a selection bug and added checks to make + sure volumes are not mounted when creating the list of + volumes which can be mkfs'ed by the ext2/3 plugin. + 2002-05-28 * fsimext2.c: Log the fsck and mke2fs command lines. Return diff --git a/lib/evms/fs_ext2.c b/lib/evms/fs_ext2.c index 16c2a2f9c..88a1485fa 100644 --- a/lib/evms/fs_ext2.c +++ b/lib/evms/fs_ext2.c @@ -631,7 +631,7 @@ static int fs_init_task( task_context_t * context ) LOGENTRY(); - context->min_selected_objects = 0; + context->min_selected_objects = 1; context->max_selected_objects = 1; context->option_descriptors->count = 0; @@ -647,7 +647,9 @@ static int fs_init_task( task_context_t * context ) switch (context->action) { case EVMS_Task_mkfs: /* only mkfs unformatted volumes */ - if (volume->file_system_manager == NULL) { + if ((volume->file_system_manager == NULL) && + !EVMS_IS_MOUNTED(volume) && + (volume->vol_size > MINEXT2)) { rc = InsertObject(context->acceptable_objects, sizeof(logical_volume_t), volume, VOLUME_TAG, NULL, InsertAtStart, TRUE, (void **)&waste); } break;