Changeset 86 in MondoRescue for trunk/mondo/mondo/common/libmondo-devices.c


Ignore:
Timestamp:
Oct 22, 2005, 12:40:18 AM (19 years ago)
Author:
bcornec
Message:

apply patch r83:85 from the 2.04_berlios branch

File:
1 edited

Legend:

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

    r75 r86  
    28912891    char *tmp;
    28922892    char *command;
     2893    char *fdisk;
     2894    struct stat buf;
    28932895
    28942896    malloc_string(tmp);
    28952897    malloc_string(command);
     2898    malloc_string(fdisk);
    28962899    log_msg(0, "Looking for partition table format type");
    2897     sprintf(command, "fdisk -l %s | grep 'EFI GPT'", drive);
     2900// BERLIOS: Do that temporarily: we need to put back parted2fdisk everywhere
     2901#ifdef __IA64__
     2902    sprintf(fdisk, "/usr/local/bin/fdisk");
     2903    if (stat(fdisk, &buf) != 0) {
     2904#endif
     2905        sprintf(fdisk, "/sbin/fdisk");
     2906#ifdef __IA64__
     2907    }
     2908#endif
     2909    log_msg(1, "Using %s",fdisk);
     2910    sprintf(command, "%s -l %s | grep 'EFI GPT'", fdisk, drive);
    28982911    strcpy(tmp, call_program_and_get_last_line_of_output(command));
    28992912    if (strstr(tmp, "GPT") == NULL) {
     
    29052918    paranoid_free(command);
    29062919    paranoid_free(tmp);
     2920    paranoid_free(fdisk);
    29072921    return (output);
    29082922}
Note: See TracChangeset for help on using the changeset viewer.