Ignore:
Timestamp:
Jan 3, 2014, 5:44:13 PM (10 years ago)
Author:
Bruno Cornec
Message:

which_partition_format now returns a dynamically allocated string which is then used consistently across the project

File:
1 edited

Legend:

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

    r3212 r3237  
    32643264char *which_partition_format(const char *drive)
    32653265{
    3266     static char output[4];
     3266    char *output = NULL;
    32673267    char *tmp = NULL;
    32683268    char *command;
     
    32773277    mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    32783278    if (strstr(tmp, "GPT") == NULL) {
    3279         strcpy(output, "MBR");
     3279        mr_asprintf(output, "%s", "MBR");
    32803280    } else {
    3281         strcpy(output, "GPT");
     3281        mr_asprintf(output, "%s", "GPT");
    32823282    }
    32833283    mr_free(tmp);
Note: See TracChangeset for help on using the changeset viewer.