Changeset 1303 in MondoRescue for branches/2.2.2/mondo


Ignore:
Timestamp:
Apr 15, 2007, 2:33:22 AM (17 years ago)
Author:
Bruno Cornec
Message:
  • Some FreeBSD fixes
  • Better messages for partition names
  • May improve the gap issue on cciss
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  
    561561#ifdef __FreeBSD__
    562562    // 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,
    564564            build_partition_name(tmp, drive, partno));
    565565    return system(program);
  • branches/2.2.2/mondo/src/common/libmondo-mountlist.c

    r1298 r1303  
    202202    npos = pos = 0;
    203203    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);
    205205        pos = find_device_in_mountlist(mountlist, device);
    206206        npos = 0;
     
    216216        }
    217217
    218         sprintf(device, "%ss%d", drive, curr_part_no);
     218        build_partition_name(device, drive, curr_part_no);
    219219        strcpy(mountpoint, mountlist->el[pos].mountpoint);
    220220        if (pos > 0 && !npos) {
     
    397397    char *tmp;
    398398    char *device;
    399     char *mountpoint;
    400399
    401400    /*@ long *********************************************************** */
     
    413412    malloc_string(tmp);
    414413    malloc_string(device);
    415     malloc_string(mountpoint);
    416414    flaws_str[0] = '\0';
    417415    prev_part_no = 0;
     
    438436            continue;
    439437        }
    440         strcpy(mountpoint, mountlist->el[pos].mountpoint);
    441438        /* gap in the partition list? */
    442439        if (curr_part_no - prev_part_no > 1) {
     
    448445            } else if (curr_part_no > 5
    449446                       || (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,
    451448                        prev_part_no, curr_part_no);
    452449                log_it(tmp);
     
    460457        if ((curr_part_no >= 5 && prev_part_no == 4)
    461458            && (strcmp(part_table_fmt, "MBR") == 0)) {
    462             sprintf(tmp, " Partition %s4 is occupied.", drive);
     459            sprintf(tmp, " Partition 4 of %s is occupied.", drive);
    463460            log_it(tmp);
    464461            strcat(flaws_str, tmp);
     
    531528    paranoid_free(tmp);
    532529    paranoid_free(device);
    533     paranoid_free(mountpoint);
    534530
    535531    if (res) {
  • branches/2.2.2/mondo/src/mondorestore/mondo-prep.c

    r746 r1303  
    12841284
    12851285    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);
    12871287        log_it(tmp);
    12881288        g_maximum_progress++;
     
    12981298    }
    12991299    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);
    13021301        log_it(tmp);
    13031302        g_maximum_progress++;
     
    19791978        strcpy(tmp, last_line_of_file(FDISK_LOG));
    19801979        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);
    19821981        } else {
    19831982            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);
    19861984        }
    19871985        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);
    19901987            retval =
    19911988                set_partition_type(pout_to_fdisk, drive, partno, format,
     
    22072204    } else if (strcmp(format, "ext2") == 0
    22082205               || strcmp(format, "reiserfs") == 0
    2209                || strcmp(format, "ext3") == 0 || strcmp(format, "xfs") == 0
     2206               || strcmp(format, "ext3") == 0
     2207               || strcmp(format, "xfs") == 0
    22102208               || strcmp(format, "jfs") == 0) {
    22112209        strcpy(partcode, "83");
     
    25842582        } else {
    25852583            sprintf(tmp, "Skipping %s", mountlist->el[partno].device);
    2586 //                      log_to_screen(tmp);
     2584//            log_to_screen(tmp);
    25872585        }
    25882586    }
Note: See TracChangeset for help on using the changeset viewer.