Changeset 89 in MondoRescue for trunk/mondo/mondo/mondorestore
- Timestamp:
- Oct 27, 2005, 10:45:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/mondorestore/mondo-prep.c
r86 r89 1803 1803 MONDO_LOGFILE); 1804 1804 1805 /* BERLIOS: shoould not be called each time */ 1806 part_table_fmt = which_partition_format(drive); 1805 1807 output[0] = '\0'; 1806 1808 /* make it a primary/extended/logical */ … … 1808 1810 sprintf(output + strlen(output), "n\np\n%d\n", partno); 1809 1811 } 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 { 1812 1829 /* 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 } 1828 1832 } 1829 1833 strcat(output + strlen(output), "\n"); /*start block (ENTER for next free blk */
Note:
See TracChangeset
for help on using the changeset viewer.