Changeset 89 in MondoRescue for trunk/mondo/mondo/mondorestore/mondo-prep.c


Ignore:
Timestamp:
Oct 27, 2005, 10:45:34 PM (18 years ago)
Author:
bcornec
Message:

merge r87:88 of the 2.04_berlios branch
indent some files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/mondo/mondorestore/mondo-prep.c

    r86 r89  
    18031803            MONDO_LOGFILE);
    18041804
     1805    /* BERLIOS: shoould not be called each time */
     1806    part_table_fmt = which_partition_format(drive);
    18051807    output[0] = '\0';
    18061808    /* make it a primary/extended/logical */
     
    18081810        sprintf(output + strlen(output), "n\np\n%d\n", partno);
    18091811    } else {
    1810         if (partno == 5) {
    1811             part_table_fmt = which_partition_format(drive);
     1812        /* MBR needs an extended partition if more than 4 partitions */
     1813        if (strcmp(part_table_fmt,"MBR") == 0) {
     1814            if (partno == 5) {
     1815                if (prev_partno >= 4) {
     1816                    log_to_screen("You need to leave at least one partition free, for 'extended/logical'");
     1817                    paranoid_free(program);
     1818                    paranoid_free(partition_name);
     1819                    paranoid_free(tmp);
     1820                    paranoid_free(logfile);
     1821                    paranoid_free(output);
     1822                    return (1);
     1823                } else {
     1824                    sprintf(output + strlen(output), "n\ne\n%d\n\n\n", prev_partno + 1);
     1825                }
     1826            }
     1827            strcat(output + strlen(output), "n\nl\n");
     1828        } else {
    18121829            /* GPT allows more than 4 primary partitions */
    1813             if ((prev_partno >= 4) && (strcmp(part_table_fmt, "MBR") == 0)) {
    1814                 log_to_screen
    1815                     ("You need to leave at least one partition free, for 'extended/logical'");
    1816                 paranoid_free(program);
    1817                 paranoid_free(partition_name);
    1818                 paranoid_free(tmp);
    1819                 paranoid_free(logfile);
    1820                 paranoid_free(output);
    1821                 return (1);
    1822             } else {
    1823                 sprintf(output + strlen(output), "n\ne\n%d\n\n\n",
    1824                         prev_partno + 1);
    1825             }
    1826         }
    1827         strcat(output + strlen(output), "n\nl\n");
     1830            sprintf(output + strlen(output), "n\np\n%d\n", partno);
     1831        }
    18281832    }
    18291833    strcat(output + strlen(output), "\n");  /*start block (ENTER for next free blk */
Note: See TracChangeset for help on using the changeset viewer.