Enabled GPT type GUIDs with -append_partition, -boot_image any iso_mbr_part_type=, and -as mkisofs -iso_mbr_part_type

This commit is contained in:
2019-02-18 13:19:32 +01:00
parent caf38e81ae
commit fc71cec8f7
17 changed files with 469 additions and 230 deletions

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2019 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -979,26 +979,14 @@ int Xorriso_set_data_cache(struct XorrisO *xorriso, void *o,
return(ret);
}
int Xorriso_format_guid(struct XorrisO *xorriso, uint8_t guid[16], char *line,
int flag)
{
int i;
line[0]= 0;
for(i= 3; i >= 0; i--)
sprintf(line + strlen(line), "%-2.2x", guid[i]);
sprintf(line + strlen(line), "-");
for(i= 5; i >= 4; i--)
sprintf(line + strlen(line), "%-2.2x", guid[i]);
sprintf(line + strlen(line), "-");
for(i= 7; i >= 6; i--)
sprintf(line + strlen(line), "%-2.2x", guid[i]);
sprintf(line + strlen(line), "-");
for(i= 8; i < 10; i++)
sprintf(line + strlen(line), "%-2.2x", guid[i]);
sprintf(line + strlen(line), "-");
for(i= 10; i < 16; i++)
sprintf(line + strlen(line), "%-2.2x", guid[i]);
/* >>> Maybe let the user switch between hex string and structured text */;
Xorriso__format_guid(guid, line, 1);
return(1);
}