Changeset 1304 in MondoRescue
- Timestamp:
- Apr 15, 2007, 2:43:15 AM (18 years ago)
- Location:
- branches/stable/mondo/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-devices.c
r1268 r1304 397 397 #ifdef __FreeBSD__ 398 398 // We assume here that this is running from mondorestore. (It is.) 399 // BERLIOS: This is BROKEN - 1 %s - 2 params !! 400 mr_asprintf(&program, "ls %s >/dev/null 2>&1", drive, 399 mr_asprintf(&program, "ls %s %s >/dev/null 2>&1", drive, 401 400 build_partition_name(tmp, drive, partno)); 402 401 res = system(program); -
branches/stable/mondo/src/common/libmondo-mountlist.c
r1302 r1304 165 165 npos = pos = 0; 166 166 for (curr_part_no = 1; curr_part_no < 99; curr_part_no++) { 167 mr_asprintf(&device, "%ss%d", drive, curr_part_no); 167 malloc_string(device); 168 build_partition_name(device, drive, curr_part_no); 168 169 pos = find_device_in_mountlist(mountlist, device); 169 170 npos = 0; … … 182 183 } 183 184 184 mr_asprintf(&device, "%ss%d", drive, curr_part_no); 185 // BERLIOS : useless ? mr_asprintf(&mountpoint, mountlist->el[pos].mountpoint); 185 build_partition_name(device, drive, curr_part_no); 186 186 if (pos > 0 && !npos) { 187 187 /* gap in the partition list? */ … … 417 417 continue; 418 418 } 419 // BERLIOS : useless ? str-cpy(mountpoint, mountlist->el[pos].mountpoint);420 419 /* gap in the partition list? */ 421 420 if (curr_part_no - prev_part_no > 1) { … … 428 427 } else if (curr_part_no > 5 429 428 || (curr_part_no <= 4 && prev_part_no > 0)) { 430 mr_asprintf(&tmp, " Gap between %s%d and %d.", drive,429 mr_asprintf(&tmp, " Gap on %s between %d and %d.", drive, 431 430 prev_part_no, curr_part_no); 432 431 log_it(tmp); … … 441 440 if ((curr_part_no >= 5 && prev_part_no == 4) 442 441 && (strcmp(part_table_fmt, "MBR") == 0)) { 443 mr_asprintf(&tmp, " Partition %s4is occupied.", drive);442 mr_asprintf(&tmp, " Partition 4 of %s is occupied.", drive); 444 443 log_it(tmp); 445 444 strcat(flaws_str, tmp); … … 497 496 prev_part_no = curr_part_no; 498 497 mr_free(device); 498 499 499 } 500 500 -
branches/stable/mondo/src/mondorestore/mondo-prep.c
r1264 r1304 1041 1041 1042 1042 if (devno_we_must_allow_for >= 5) { 1043 log_it("Making dummy primary %s%d", drivename, 1);1043 log_it("Making dummy primary 1 on %s", drivename); 1044 1044 g_maximum_progress++; 1045 1045 res = … … 1054 1054 } 1055 1055 for (; current_devno < devno_we_must_allow_for; current_devno++) { 1056 log_it("Creating dummy partition % s%d", drivename, current_devno);1056 log_it("Creating dummy partition %d on %s", current_devno, drivename); 1057 1057 g_maximum_progress++; 1058 1058 res = … … 1709 1709 mr_asprintf(&tmp, last_line_of_file(FDISK_LOG)); 1710 1710 if (strstr(tmp, " (m ")) { 1711 mr_msg(1, "Successfully created %s%d", drive, partno);1711 mr_msg(1, "Successfully created partition %d on %s", partno, drive); 1712 1712 } else { 1713 1713 mr_msg(1, "last line = %s", tmp); 1714 mr_msg(1, "Failed to create %s%d; sending 'Enter'...", drive, 1715 partno); 1714 mr_msg(1, "Failed to create partition %d on %s; sending 'Enter'...", partno, drive); 1716 1715 } 1717 1716 mr_free(tmp); 1718 1717 1719 1718 if (!retval) { 1720 mr_msg(1, "Trying to set %s%d's partition type now", drive, 1721 partno); 1719 mr_msg(1, "Trying to set partition %d type now on %s", partno, drive); 1722 1720 retval = 1723 1721 set_partition_type(pout_to_fdisk, drive, partno, format, … … 1920 1918 } else if (strcmp(format, "ext2") == 0 1921 1919 || strcmp(format, "reiserfs") == 0 1922 || strcmp(format, "ext3") == 0 || strcmp(format, "xfs") == 0 1920 || strcmp(format, "ext3") == 0 1921 || strcmp(format, "xfs") == 0 1923 1922 || strcmp(format, "jfs") == 0) { 1924 1923 mr_asprintf(&partcode, "83"); … … 2295 2294 strlen(drive_name)) == 0) { 2296 2295 original_size_of_drive += mountlist->el[partno].size; 2296 } else { 2297 sprintf(tmp, "Skipping %s", mountlist->el[partno].device); 2298 log_to_screen(tmp); 2297 2299 } 2298 2300 }
Note:
See TracChangeset
for help on using the changeset viewer.