Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=f5ceaa7547b5ab0024e5aaef1868fe528d7c6ffd
commit f5ceaa7547b5ab0024e5aaef1868fe528d7c6ffd Author: James Buren <[email protected]> Date: Tue Aug 14 14:44:52 2012 -0500 fix writing of gpt label if UUID is not defined. diff --git a/utility.c b/utility.c index c1f279a..1911157 100644 --- a/utility.c +++ b/utility.c @@ -488,7 +488,7 @@ extern bool write_device_data(const struct device *device) } else if(strcmp(device->label,"gpt") == 0) { - snprintf(cmd,sizeof(cmd),"sgdisk --clear"); + snprintf(cmd,sizeof(cmd),"sgdisk --clear --disk-guid='%s'",(device->uuid != 0) ? device->uuid : "R"); part = device->partitions; @@ -498,7 +498,7 @@ extern bool write_device_data(const struct device *device) snprintf_append(cmd,sizeof(cmd)," --change-name=%llu:'%s'",part->num,part->name); - snprintf_append(cmd,sizeof(cmd)," --partition-guid=%llu:'%s'",part->num,part->uuid); + snprintf_append(cmd,sizeof(cmd)," --partition-guid=%llu:'%s'",part->num,(part->uuid != 0) ? part->uuid : "R"); snprintf_append(cmd,sizeof(cmd)," --typecode=%llu:'%s'",part->num,part->type_s); _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
