Changeset 59 in MondoRescue for trunk/mondo/mondo/common/libmondo-mountlist.c


Ignore:
Timestamp:
Oct 11, 2005, 1:34:31 AM (19 years ago)
Author:
bcornec
Message:

Trunk: indent on all source files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/mondo/common/libmondo-mountlist.c

    r49 r59  
    122122            if (device_copies > 1) {
    123123                asprintf(&tmp, " %s %s's.", number_to_text(device_copies),
    124                         device);
     124                         device);
    125125                if (!strstr(flaws_str, tmp)) {
    126126                    log_it(tmp);
     
    184184            return ++res;       // fatal error
    185185        }
    186 
    187186        // BERLIOS : useless ? asprintf(&mountpoint, mountlist->el[pos].mountpoint);
    188187        if (pos > 0 && !npos) {
     
    199198                           || (curr_part_no <= 4 && prev_part_no > 0)) {
    200199                    asprintf(&tmp, " Gap between %ss%d and %d.", drive,
    201                             prev_part_no, curr_part_no);
     200                             prev_part_no, curr_part_no);
    202201                    log_it(tmp);
    203202                    strcat(flaws_str, tmp);
     
    226225            if (device_copies > 1) {
    227226                asprintf(&tmp, " %s %s's.", number_to_text(device_copies),
    228                         device);
     227                         device);
    229228                if (!strstr(flaws_str, tmp)) {
    230229                    log_it(tmp);
     
    268267            /* Check subpartitions */
    269268            for (cur_sp_no = 'a'; cur_sp_no < 'z'; ++cur_sp_no) {
    270                 asprintf(&device, "%ss%d%c", drive, curr_part_no, cur_sp_no);
     269                asprintf(&device, "%ss%d%c", drive, curr_part_no,
     270                         cur_sp_no);
    271271                pos = find_device_in_mountlist(mountlist, device);
    272272                if (pos < 0) {
     
    276276                /* is it too big? */
    277277                if (curr_part_no > 'h') {
    278                     asprintf(&tmp, " Can only have up to 'h' in disklabel.");
     278                    asprintf(&tmp,
     279                             " Can only have up to 'h' in disklabel.");
    279280                    log_it(tmp);
    280281                    strcat(flaws_str, tmp);
     
    291292                if (device_copies > 1) {
    292293                    asprintf(&tmp, " %s %s's.",
    293                             number_to_text(device_copies), device);
     294                             number_to_text(device_copies), device);
    294295                    if (!strstr(flaws_str, tmp)) {
    295296                        log_it(tmp);
     
    345346    {
    346347        asprintf(&tmp, " %ld MB over-allocated on %s.",
    347                 amount_allocated - physical_drive_size, drive);
     348                 amount_allocated - physical_drive_size, drive);
    348349        log_it(tmp);
    349350        strcat(flaws_str, tmp);
     
    352353    } else if (amount_allocated < physical_drive_size - 1) {    /* NOT AN ERROR, JUST A WARNING :-) */
    353354        asprintf(&tmp, " %ld MB unallocated on %s.",
    354                 physical_drive_size - amount_allocated, drive);
     355                 physical_drive_size - amount_allocated, drive);
    355356        log_it(tmp);
    356         strcat(flaws_str, tmp);
     357        strcat(flaws_str, tmp);
    357358        paranoid_free(tmp);
    358359    }
     
    407408        log_msg(1, tmp);
    408409        paranoid_free(tmp);
    409         return(FALSE);
     410        return (FALSE);
    410411    } else {
    411412        asprintf(&tmp, "%s is %ld MB", drive, physical_drive_size);
     
    439440                       || (curr_part_no <= 4 && prev_part_no > 0)) {
    440441                asprintf(&tmp, " Gap between %s%d and %d.", drive,
    441                         prev_part_no, curr_part_no);
     442                         prev_part_no, curr_part_no);
    442443                log_it(tmp);
    443444                strcat(flaws_str, tmp);
     
    466467        if (device_copies > 1) {
    467468            asprintf(&tmp, " %s %s's.", number_to_text(device_copies),
    468                     device);
     469                     device);
    469470            if (!strstr(flaws_str, tmp)) {
    470471                log_it(tmp);
     
    512513    if (amount_allocated > physical_drive_size + 1) {
    513514        asprintf(&tmp, " %ld MB over-allocated on %s.",
    514                 amount_allocated - physical_drive_size, drive);
     515                 amount_allocated - physical_drive_size, drive);
    515516        log_it(tmp);
    516517        strcat(flaws_str, tmp);
     
    519520    } else if (amount_allocated < physical_drive_size - 1) {    /* NOT AN ERROR, JUST A WARNING :-) */
    520521        asprintf(&tmp, " %ld MB unallocated on %s.",
    521                 physical_drive_size - amount_allocated, drive);
     522                 physical_drive_size - amount_allocated, drive);
    522523        log_it(tmp);
    523524        strcat(flaws_str, tmp);
     
    578579             DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE)) {
    579580            asprintf(&tmp, " Not evaluating %s (I don't know how yet)",
    580                     drivelist->el[i].device);
     581                     drivelist->el[i].device);
    581582            log_it(tmp);
    582583        } else {
     
    668669            && strcmp(curr_mountpoint, "raid")) {
    669670            asprintf(&tmp, " %s %s's.", number_to_text(copies),
    670                     curr_mountpoint);
     671                     curr_mountpoint);
    671672            strcat(flaws_str, tmp);
    672673            log_it(tmp);
     
    707708            && strcmp(mountlist->el[i].mountpoint, "image") != 0) {
    708709            asprintf(&tmp, " %s has unknown format.",
    709                     mountlist->el[i].device);
     710                     mountlist->el[i].device);
    710711            log_it(tmp);
    711712            strcat(flaws_str, tmp);
     
    760761        if (!strncmp(drive, RAID_DEVICE_STUB, strlen(RAID_DEVICE_STUB))) {
    761762            asprintf(&tmp,
    762                     "Not putting %s in list of drives: it's a virtual drive",
    763                     drive);
     763                     "Not putting %s in list of drives: it's a virtual drive",
     764                     drive);
    764765            log_msg(8, tmp);
    765766            paranoid_free(tmp);
     
    770771        if (size == 0) {
    771772            asprintf(&tmp,
    772                     "Not putting %s in list of drives: it has zero size (maybe an LVM volume)",
    773                     drive);
     773                     "Not putting %s in list of drives: it has zero size (maybe an LVM volume)",
     774                     drive);
    774775            log_msg(8, tmp);
    775776            paranoid_free(tmp);
     
    789790
    790791        asprintf(&tmp,
    791                 "Putting %s with size %lli in list of drives",
    792                 drive, size);
     792                 "Putting %s with size %lli in list of drives",
     793                 drive, size);
    793794        log_msg(8, tmp);
    794795        paranoid_free(tmp);
     
    820821 */
    821822void make_list_of_unallocated_raid_partitions(struct mountlist_itself
    822                                               *output_list,
    823                                               struct mountlist_itself
    824                                               *mountlist,
    825                                               struct raidlist_itself
     823                                              *output_list, struct mountlist_itself
     824                                              *mountlist, struct raidlist_itself
    826825                                              *raidlist)
    827826{
     
    853852                       sizeof(struct mountlist_line));
    854853                asprintf(&tmp,
    855                         "%s is available; user may choose to add it to raid device",
    856                         output_list->el[items - 1].device);
     854                         "%s is available; user may choose to add it to raid device",
     855                         output_list->el[items - 1].device);
    857856                log_it(tmp);
    858857                paranoid_free(tmp);
     
    972971                strcat(mountlist->el[items].device, "_dup");
    973972                asprintf(&tmp,
    974                         "Duplicate entry in mountlist - renaming to %s",
    975                         mountlist->el[items].device);
     973                         "Duplicate entry in mountlist - renaming to %s",
     974                         mountlist->el[items].device);
    976975                log_it(tmp);
    977976                paranoid_free(tmp);
     
    993992
    994993            asprintf(&tmp,
    995                     "%s %s %s %lld %s",
    996                     mountlist->el[items].device,
    997                     mountlist->el[items].mountpoint,
    998                     mountlist->el[items].format,
    999                     mountlist->el[items].size, mountlist->el[items].label);
     994                     "%s %s %s %lld %s",
     995                     mountlist->el[items].device,
     996                     mountlist->el[items].mountpoint,
     997                     mountlist->el[items].format,
     998                     mountlist->el[items].size,
     999                     mountlist->el[items].label);
    10001000
    10011001            log_it(tmp);
Note: See TracChangeset for help on using the changeset viewer.