]> Zhao Yanbai Git Server - minix.git/commitdiff
Always do sanity check now. (Possible now that we have lba48.)
authorBen Gras <ben@minix3.org>
Fri, 3 Mar 2006 15:34:24 +0000 (15:34 +0000)
committerBen Gras <ben@minix3.org>
Fri, 3 Mar 2006 15:34:24 +0000 (15:34 +0000)
commands/ibm/autopart.c

index b55c1f4dea7763de60b79c1f17c06d4e900ab1db..04e329a9e138e528beb44942d792e10debdf4912 100755 (executable)
@@ -1748,22 +1748,15 @@ int cylinderalign(region_t *reg)
 
 void regionize(void)
 {
-       int free_sec, i, si, sanitycheck = 1;
+       int free_sec, i, si;
 
        sort();
 
        free_sec = table[0].lowsec + sectors;
 
-       /* Looks like disk too big - disable sanity check. */
-       if(table[0].size >= (1L << 28) - 1) {
-               fprintf(stderr, "WARNING: disabling sanity checks.\n");
-               sanitycheck = 0;
-       }
-
        /* Create region data used in autopart mode. */
        free_regions = used_regions = nr_regions = nr_partitions = 0;
-       if(sanitycheck &&
-               table[0].lowsec > table[sort_order[1]].lowsec &&
+       if(table[0].lowsec > table[sort_order[1]].lowsec &&
                table[sort_order[1]].sysind != NO_PART) {
                printf("\nSanity check failed on %s - first partition starts before disk.\n"
                        "Please use expert mode to correct it.\n", curdev->name);
@@ -1792,7 +1785,7 @@ void regionize(void)
                }
 
                /* Sanity check. */
-               if(sanitycheck && si > 1) {
+               if(si > 1) {
                        if(table[i].lowsec < table[sort_order[si-1]].lowsec ||
                           table[i].lowsec < table[sort_order[si-1]].lowsec + table[sort_order[si-1]].size) {
                                printf("\nSanity check failed on %s - partitions overlap.\n"
@@ -1800,7 +1793,7 @@ void regionize(void)
                                exit(1);
                        }
                }
-               if(sanitycheck && table[i].size > table[0].size) {
+               if(table[i].size > table[0].size) {
                        printf("\nSanity check failed on %s - partition is larger than disk.\n"
                                "Please use expert mode to correct it.\n", curdev->name);
                        exit(1);