Ignore:
Timestamp:
Apr 18, 2015, 7:15:32 PM (5 years ago)
Author:
Bruno Cornec
Message:
  • Rename mindi/parted2fdisk.pl into mindi/mr_parted2fdisk and make all adaptations required
File:
1 edited

Legend:

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

    r3352 r3371  
    324324#if __FreeBSD__
    325325    return
    326         !system
    327         ("for drive in /dev/ad? /dev/da?; do fdisk $drive | grep -q FreeBSD && exit 0; done; false");
     326        !system("for drive in /dev/ad? /dev/da?; do fdisk $drive | grep -q FreeBSD && exit 0; done; false");
    328327#else
    329328    return
    330         !system
    331         ("parted2fdisk -l 2>/dev/null | grep '^/dev/' | grep -Eqv '(MS|DOS|FAT|NTFS)'");
     329        !system("mr_parted2fdisk -l 2>/dev/null | grep '^/dev/' | grep -Eqv '(MS|DOS|EFI|FAT|NTFS)'");
    332330#endif
    333331}
     
    366364#endif
    367365
    368     mr_asprintf(program, "parted2fdisk -l %s 2> /dev/null", drive);
     366    mr_asprintf(program, "mr_parted2fdisk -l %s 2> /dev/null", drive);
    369367    fin = popen(program, "r");
    370368    if (!fin) {
     
    17311729    * Either way, it's an error.
    17321730    ********/
    1733     mr_asprintf(command, "parted2fdisk -l %s 2>/dev/null|grep -E \"^/dev/\"|awk '{printf(\"%%s \", $1)}END{print \"\"}'", dsf);
     1731    mr_asprintf(command, "mr_parted2fdisk -l %s 2>/dev/null|grep -E \"^/dev/\"|awk '{printf(\"%%s \", $1)}END{print \"\"}'", dsf);
    17341732    log_msg(5, "Executing: %s", command);
    17351733    mr_asprintf(partition_list, "%s", call_program_and_get_last_line_of_output(command));
     
    17971795        log_msg(4, "Processing partition: %s", partitions[i]);
    17981796        /* See if it's swap. If it is, ignore it. */
    1799         mr_asprintf(command, "parted2fdisk -l %s 2>/dev/null | awk '{if(($1==\"%s\")&&(toupper($0) ~ \"SWAP\")){print $1;exit}}'", ndsf, partitions[i]);
     1797        mr_asprintf(command, "mr_parted2fdisk -l %s 2>/dev/null | awk '{if(($1==\"%s\")&&(toupper($0) ~ \"SWAP\")){print $1;exit}}'", ndsf, partitions[i]);
    18001798        log_msg(5, "  Running: %s", command);
    18011799        mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
     
    26632661        mr_free(tmp);
    26642662// NTFS
    2665         strcpy(tmp1, call_program_and_get_last_line_of_output("parted2fdisk -l 2>/dev/null | grep -i ntfs | awk '{ print $1};' | tr -s '\\n' ' ' | awk '{ print $0};'"));
     2663        strcpy(tmp1, call_program_and_get_last_line_of_output("mr_parted2fdisk -l 2>/dev/null | grep -i ntfs | awk '{ print $1};' | tr -s '\\n' ' ' | awk '{ print $0};'"));
    26662664        if (strlen(tmp1) > 2) {
    26672665            if (!popup_and_get_string("NTFS partitions", "Please enter/confirm the NTFS partitions you wish to backup as well.", tmp1, MAX_STR_LEN / 4)) {
     
    30813079    assert(which_device != NULL);
    30823080
    3083     mr_asprintf(list_drives_cmd, "parted2fdisk -l 2>/dev/null | grep \"/dev/.*:\" | tr -s ':' ' ' | tr -s ' ' '\n' | grep /dev/; echo %s", where_is_root_mounted());
     3081    mr_asprintf(list_drives_cmd, "mr_parted2fdisk -l 2>/dev/null | grep \"/dev/.*:\" | tr -s ':' ' ' | tr -s ' ' '\n' | grep /dev/; echo %s", where_is_root_mounted());
    30843082    log_it("list_drives_cmd = %s", list_drives_cmd);
    30853083
     
    31233121    } else {
    31243122        // We need to look on each partition then
    3125         mr_asprintf(list_drives_cmd, "parted2fdisk -l 2>/dev/null | grep -E \"^/dev/\" | tr -s ':' ' ' | tr -s ' ' '\n' | grep /dev/");
     3123        mr_asprintf(list_drives_cmd, "mr_parted2fdisk -l 2>/dev/null | grep -E \"^/dev/\" | tr -s ':' ' ' | tr -s ' ' '\n' | grep /dev/");
    31263124        log_it("list_drives_cmd = %s", list_drives_cmd);
    31273125
     
    32713269    struct stat buf;
    32723270#endif
    3273     mr_asprintf(command, "parted2fdisk -l %s 2>/dev/null | grep 'EFI GPT'", drive);
     3271    mr_asprintf(command, "mr_parted2fdisk -l %s 2>/dev/null | grep 'EFI GPT'", drive);
    32743272    mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    32753273    mr_free(command);
Note: See TracChangeset for help on using the changeset viewer.