Ignore:
Timestamp:
Apr 12, 2007, 1:56:35 AM (17 years ago)
Author:
Bruno Cornec
Message:
  • evaluate_drive_within_mountlist is a private function
  • support UUID in mondorestore (Fix for #103)
  • Fix a bug in size computation for cciss and similar devices needing a p before their partition name
  • Fix 2 references to grep -x which are not working during a restore process due to busybox limits of grep command (Fix for #96)
File:
1 edited

Legend:

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

    r1180 r1297  
    411411
    412412    for (curr_part_no = 1; curr_part_no < 99; curr_part_no++) {
    413         mr_asprintf(&device, "%s%d", drive, curr_part_no);
     413        if ((strstr(device, "/cciss/") != NULL) ||
     414            (strstr(device, "/ataraid/") != NULL) ||
     415            (strstr(device, "/ida/") != NULL) ||
     416            (strstr(device, "/rd/") != NULL)) {
     417                mr_asprintf(&device, "%sp%d", drive, curr_part_no);
     418                sprintf(device, "%sp%d", drive, curr_part_no);
     419            } else {   
     420                mr_asprintf(&device, "%s%d", drive, curr_part_no);
     421            }
    414422        pos = find_device_in_mountlist(mountlist, device);
    415423        if (pos < 0) {
     
    418426        if (physical_drive_size < 0) {
    419427            mr_asprintf(&tmp, " %s refers to non-existent hardware.", device);
     428            log_it(tmp);
    420429            strcat(flaws_str, tmp);
    421430            res++;
     
    848857#if linux
    849858        sscanf(incoming,
    850                "%s %s %s %s %s",
     859               "%s %s %s %s %s %s",
    851860               mountlist->el[items].device,
    852861               mountlist->el[items].mountpoint,
    853862               mountlist->el[items].format,
    854                siz, mountlist->el[items].label);
     863               siz, mountlist->el[items].label, mountlist->el[items].uuid);
    855864#elif __FreeBSD__
    856865        sscanf(incoming,
     
    860869               mountlist->el[items].format, siz);
    861870        strcpy(mountlist->el[items].label, "");
     871        strcpy(mountlist->el[items].uuid, "");
    862872#endif
    863873
     
    914924                     mountlist->el[items].format,
    915925                     mountlist->el[items].size,
    916                      mountlist->el[items].label);
     926                    mountlist->el[items].label,
     927                    mountlist->el[items].uuid);
    917928            items++;
    918929        }
     
    956967                mountlist->el[i].device, mountlist->el[i].mountpoint,
    957968                mountlist->el[i].format, mountlist->el[i].size,
    958                 mountlist->el[i].label);
     969                mountlist->el[i].label, mountlist->el[i].uuid);
    959970    }
    960971    paranoid_fclose(fout);
Note: See TracChangeset for help on using the changeset viewer.