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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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) {
Note: See TracChangeset for help on using the changeset viewer.