Changeset 1304 in MondoRescue


Ignore:
Timestamp:
Apr 15, 2007, 2:43:15 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/stable/mondo/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-devices.c

    r1268 r1304  
    397397#ifdef __FreeBSD__
    398398    // 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,
    401400            build_partition_name(tmp, drive, partno));
    402401    res = system(program);
  • branches/stable/mondo/src/common/libmondo-mountlist.c

    r1302 r1304  
    165165    npos = pos = 0;
    166166    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);
    168169        pos = find_device_in_mountlist(mountlist, device);
    169170        npos = 0;
     
    182183        }
    183184
    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);
    186186        if (pos > 0 && !npos) {
    187187            /* gap in the partition list? */
     
    417417            continue;
    418418        }
    419         // BERLIOS : useless ? str-cpy(mountpoint, mountlist->el[pos].mountpoint);
    420419        /* gap in the partition list? */
    421420        if (curr_part_no - prev_part_no > 1) {
     
    428427            } else if (curr_part_no > 5
    429428                       || (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,
    431430                        prev_part_no, curr_part_no);
    432431                log_it(tmp);
     
    441440        if ((curr_part_no >= 5 && prev_part_no == 4)
    442441            && (strcmp(part_table_fmt, "MBR") == 0)) {
    443             mr_asprintf(&tmp, " Partition %s4 is occupied.", drive);
     442            mr_asprintf(&tmp, " Partition 4 of %s is occupied.", drive);
    444443            log_it(tmp);
    445444            strcat(flaws_str, tmp);
     
    497496        prev_part_no = curr_part_no;
    498497        mr_free(device);
     498
    499499    }
    500500
  • branches/stable/mondo/src/mondorestore/mondo-prep.c

    r1264 r1304  
    10411041
    10421042    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);
    10441044        g_maximum_progress++;
    10451045        res =
     
    10541054    }
    10551055    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);
    10571057        g_maximum_progress++;
    10581058        res =
     
    17091709        mr_asprintf(&tmp, last_line_of_file(FDISK_LOG));
    17101710        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);
    17121712        } else {
    17131713            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);
    17161715        }
    17171716        mr_free(tmp);
    17181717
    17191718        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);
    17221720            retval =
    17231721                set_partition_type(pout_to_fdisk, drive, partno, format,
     
    19201918    } else if (strcmp(format, "ext2") == 0
    19211919               || strcmp(format, "reiserfs") == 0
    1922                || strcmp(format, "ext3") == 0 || strcmp(format, "xfs") == 0
     1920               || strcmp(format, "ext3") == 0
     1921               || strcmp(format, "xfs") == 0
    19231922               || strcmp(format, "jfs") == 0) {
    19241923        mr_asprintf(&partcode, "83");
     
    22952294             strlen(drive_name)) == 0) {
    22962295            original_size_of_drive += mountlist->el[partno].size;
     2296        } else {
     2297            sprintf(tmp, "Skipping %s", mountlist->el[partno].device);
     2298            log_to_screen(tmp);
    22972299        }
    22982300    }
Note: See TracChangeset for help on using the changeset viewer.