Changeset 1303 in MondoRescue
- Timestamp:
- Apr 15, 2007, 2:33:22 AM (18 years ago)
- Location:
- branches/2.2.2/mondo/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.2/mondo/src/common/libmondo-devices.c
r958 r1303 561 561 #ifdef __FreeBSD__ 562 562 // We assume here that this is running from mondorestore. (It is.) 563 sprintf(program, "ls %s >/dev/null 2>&1", drive,563 sprintf(program, "ls %s %s >/dev/null 2>&1", drive, 564 564 build_partition_name(tmp, drive, partno)); 565 565 return system(program); -
branches/2.2.2/mondo/src/common/libmondo-mountlist.c
r1298 r1303 202 202 npos = pos = 0; 203 203 for (curr_part_no = 1; curr_part_no < 99; curr_part_no++) { 204 sprintf(device, "%ss%d", drive, curr_part_no);204 build_partition_name(device, drive, curr_part_no); 205 205 pos = find_device_in_mountlist(mountlist, device); 206 206 npos = 0; … … 216 216 } 217 217 218 sprintf(device, "%ss%d", drive, curr_part_no);218 build_partition_name(device, drive, curr_part_no); 219 219 strcpy(mountpoint, mountlist->el[pos].mountpoint); 220 220 if (pos > 0 && !npos) { … … 397 397 char *tmp; 398 398 char *device; 399 char *mountpoint;400 399 401 400 /*@ long *********************************************************** */ … … 413 412 malloc_string(tmp); 414 413 malloc_string(device); 415 malloc_string(mountpoint);416 414 flaws_str[0] = '\0'; 417 415 prev_part_no = 0; … … 438 436 continue; 439 437 } 440 strcpy(mountpoint, mountlist->el[pos].mountpoint);441 438 /* gap in the partition list? */ 442 439 if (curr_part_no - prev_part_no > 1) { … … 448 445 } else if (curr_part_no > 5 449 446 || (curr_part_no <= 4 && prev_part_no > 0)) { 450 sprintf(tmp, " Gap between %s%d and %d.", drive,447 sprintf(tmp, " Gap on %s between %d and %d.", drive, 451 448 prev_part_no, curr_part_no); 452 449 log_it(tmp); … … 460 457 if ((curr_part_no >= 5 && prev_part_no == 4) 461 458 && (strcmp(part_table_fmt, "MBR") == 0)) { 462 sprintf(tmp, " Partition %s4is occupied.", drive);459 sprintf(tmp, " Partition 4 of %s is occupied.", drive); 463 460 log_it(tmp); 464 461 strcat(flaws_str, tmp); … … 531 528 paranoid_free(tmp); 532 529 paranoid_free(device); 533 paranoid_free(mountpoint);534 530 535 531 if (res) { -
branches/2.2.2/mondo/src/mondorestore/mondo-prep.c
r746 r1303 1284 1284 1285 1285 if (devno_we_must_allow_for >= 5) { 1286 sprintf(tmp, "Making dummy primary %s%d", drivename, 1);1286 sprintf(tmp, "Making dummy primary 1 on %s", drivename); 1287 1287 log_it(tmp); 1288 1288 g_maximum_progress++; … … 1298 1298 } 1299 1299 for (; current_devno < devno_we_must_allow_for; current_devno++) { 1300 sprintf(tmp, "Creating dummy partition %s%d", drivename, 1301 current_devno); 1300 sprintf(tmp, "Creating dummy partition %d on %s", current_devno, drivename); 1302 1301 log_it(tmp); 1303 1302 g_maximum_progress++; … … 1979 1978 strcpy(tmp, last_line_of_file(FDISK_LOG)); 1980 1979 if (strstr(tmp, " (m ")) { 1981 log_msg(1, "Successfully created %s%d", drive, partno);1980 log_msg(1, "Successfully created partition %d on %s", partno, drive); 1982 1981 } else { 1983 1982 log_msg(1, "last line = %s", tmp); 1984 log_msg(1, "Failed to create %s%d; sending 'Enter'...", drive, 1985 partno); 1983 log_msg(1, "Failed to create partition %d on %s; sending 'Enter'...", partno, drive); 1986 1984 } 1987 1985 if (!retval) { 1988 log_msg(1, "Trying to set %s%d's partition type now", drive, 1989 partno); 1986 log_msg(1, "Trying to set partition %d type now on %s", partno, drive); 1990 1987 retval = 1991 1988 set_partition_type(pout_to_fdisk, drive, partno, format, … … 2207 2204 } else if (strcmp(format, "ext2") == 0 2208 2205 || strcmp(format, "reiserfs") == 0 2209 || strcmp(format, "ext3") == 0 || strcmp(format, "xfs") == 0 2206 || strcmp(format, "ext3") == 0 2207 || strcmp(format, "xfs") == 0 2210 2208 || strcmp(format, "jfs") == 0) { 2211 2209 strcpy(partcode, "83"); … … 2584 2582 } else { 2585 2583 sprintf(tmp, "Skipping %s", mountlist->el[partno].device); 2586 // 2584 // log_to_screen(tmp); 2587 2585 } 2588 2586 }
Note:
See TracChangeset
for help on using the changeset viewer.