Whamcloud - gitweb
fs_ext2.c (fs_init_task): Fix minor bugs pointed out by Steve
authorTheodore Ts'o <tytso@mit.edu>
Sun, 2 Jun 2002 01:48:24 +0000 (21:48 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 2 Jun 2002 01:48:24 +0000 (21:48 -0400)
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.

lib/evms/ChangeLog
lib/evms/fs_ext2.c

index a977ce8..bc35340 100644 (file)
@@ -1,3 +1,10 @@
+2002-06-01    <tytso@thunk.org>
+
+       * 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    <tytso@thunk.org>
 
        * fsimext2.c: Log the fsck and mke2fs command lines.  Return
index 16c2a2f..88a1485 100644 (file)
@@ -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;