installer: Fix the check for partitions <50GB a bit more.
authorSascha Wildner <saw@online.de>
Sat, 13 Feb 2010 17:07:04 +0000 (18:07 +0100)
committerSascha Wildner <saw@online.de>
Sat, 13 Feb 2010 17:07:04 +0000 (18:07 +0100)
/boot or swap could have '*' for size too, in theory.

usr.sbin/installer/dfuibe_installer/fn_subpart_hammer.c

index fa92144..a117a8b 100644 (file)
@@ -291,12 +291,13 @@ check_capacity(struct i_fn_args *a)
                                    subpartition_get_mountpoint(sp), min_capacity[mtpt]);
                        }
                }
-               if ((subpartition_get_capacity(sp) == -1 &&
-                    remaining_capacity < HAMMER_MIN) ||
-                   (strcmp(subpartition_get_mountpoint(sp), "/boot") != 0 &&
-                    strcmp(subpartition_get_mountpoint(sp), "swap") != 0 &&
-                    subpartition_get_capacity(sp) < HAMMER_MIN))
-                       warn_smallpart++;
+               if (strcmp(subpartition_get_mountpoint(sp), "/boot") != 0 &&
+                   strcmp(subpartition_get_mountpoint(sp), "swap") != 0) {
+                       if ((subpartition_get_capacity(sp) == -1 &&
+                            remaining_capacity < HAMMER_MIN) ||
+                           (subpartition_get_capacity(sp) < HAMMER_MIN))
+                               warn_smallpart++;
+               }
        }
 
        if (total_capacity > slice_get_capacity(storage_get_selected_slice(a->s))) {