"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xorriso/write_run.c" between
libisoburn-1.5.0.tar.gz and libisoburn-1.5.2.tar.gz

About: libisoburn is a frontend for the libraries libburn and libisofs which enables creation and expansion of ISO-9660 filesystems on all media and file types supported by libburn. It implements the API and command interpreter of program xorriso, and installs this program as small dynamically linked binary. xorriso is suitable for incremental data backup and for production of bootable ISO 9660 images. A statically linked version is available as GNU xorriso.

write_run.c  (libisoburn-1.5.0):write_run.c  (libisoburn-1.5.2)
skipping to change at line 337 skipping to change at line 337
"Unformatted %s medium detected. Trying -format fast.", "Unformatted %s medium detected. Trying -format fast.",
profile_name); profile_name);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
ret= Xorriso_format_media(xorriso, (off_t) 0, 1 | 4); ret= Xorriso_format_media(xorriso, (off_t) 0, 1 | 4);
if(ret<=0) { if(ret<=0) {
sprintf(xorriso->info_text, "Automatic formatting of %s failed", sprintf(xorriso->info_text, "Automatic formatting of %s failed",
profile_name); profile_name);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(ret); return(ret);
} }
burn_drive_re_assess(drive, 0);
} }
} }
return(1); return(1);
} }
/* @param flag bit0= fail on indev == outdev with "imported_iso" /* @param flag bit0= fail on indev == outdev with "imported_iso"
bit1= fail on indev == NULL with "imported_iso" bit1= fail on indev == NULL with "imported_iso"
*/ */
int Xorriso_check_intvl_string(struct XorrisO *xorriso, char **part_image, int Xorriso_check_intvl_string(struct XorrisO *xorriso, char **part_image,
int flag) int flag)
skipping to change at line 949 skipping to change at line 950
if(strcmp(xorriso->appended_partitions[i], ".") == 0) if(strcmp(xorriso->appended_partitions[i], ".") == 0)
part_image= ""; part_image= "";
else else
part_image= xorriso->appended_partitions[i]; part_image= xorriso->appended_partitions[i];
intvl_string= Xorriso_check_intvl_string(xorriso, &part_image, intvl_check); intvl_string= Xorriso_check_intvl_string(xorriso, &part_image, intvl_check);
if(intvl_string < 0) if(intvl_string < 0)
{ret= 0; goto ex;} {ret= 0; goto ex;}
isoburn_igopt_set_partition_img(sopts, i + 1, isoburn_igopt_set_partition_img(sopts, i + 1,
xorriso->appended_part_types[i], part_image); xorriso->appended_part_types[i], part_image);
isoburn_igopt_set_part_flag(sopts, i + 1, intvl_string); isoburn_igopt_set_part_flag(sopts, i + 1, intvl_string);
isoburn_igopt_set_part_type_guid(sopts, i + 1,
xorriso->appended_part_type_guids[i],
xorriso->appended_part_gpt_flags[i] & 1);
} }
isoburn_igopt_set_appended_as_gpt(sopts, xorriso->appended_as_gpt); isoburn_igopt_set_appended_as_gpt(sopts, xorriso->appended_as_gpt);
isoburn_igopt_set_appended_as_apm(sopts, xorriso->appended_as_apm); isoburn_igopt_set_appended_as_apm(sopts, xorriso->appended_as_apm);
isoburn_igopt_set_part_like_isohybrid(sopts, xorriso->part_like_isohybrid); isoburn_igopt_set_part_like_isohybrid(sopts, xorriso->part_like_isohybrid);
isoburn_igopt_set_iso_mbr_part_type(sopts, xorriso->iso_mbr_part_type); isoburn_igopt_set_iso_mbr_part_type(sopts, xorriso->iso_mbr_part_type);
isoburn_igopt_set_iso_type_guid(sopts, xorriso->iso_gpt_type_guid,
xorriso->iso_mbr_part_flag & 1);
isoburn_igopt_set_gpt_guid(sopts, xorriso->gpt_guid, xorriso->gpt_guid_mode); isoburn_igopt_set_gpt_guid(sopts, xorriso->gpt_guid, xorriso->gpt_guid_mode);
isoburn_igopt_set_disc_label(sopts, xorriso->ascii_disc_label); isoburn_igopt_set_disc_label(sopts, xorriso->ascii_disc_label);
isoburn_igopt_set_hfsp_serial_number(sopts, xorriso->hfsp_serial_number); isoburn_igopt_set_hfsp_serial_number(sopts, xorriso->hfsp_serial_number);
isoburn_igopt_set_hfsp_block_size(sopts, xorriso->hfsp_block_size, isoburn_igopt_set_hfsp_block_size(sopts, xorriso->hfsp_block_size,
xorriso->apm_block_size); xorriso->apm_block_size);
isoburn_igopt_set_pvd_times(sopts, isoburn_igopt_set_pvd_times(sopts,
xorriso->vol_creation_time, xorriso->vol_modification_time, xorriso->vol_creation_time, xorriso->vol_modification_time,
xorriso->vol_expiration_time, xorriso->vol_effective_time, xorriso->vol_expiration_time, xorriso->vol_effective_time,
xorriso->vol_uuid); xorriso->vol_uuid);
skipping to change at line 3099 skipping to change at line 3105
goto ex; goto ex;
ret= 1; ret= 1;
ex:; ex:;
Xorriso_process_msg_queues(xorriso, 0); Xorriso_process_msg_queues(xorriso, 0);
if(burn_options != NULL) if(burn_options != NULL)
burn_write_opts_free(burn_options); burn_write_opts_free(burn_options);
return(ret); return(ret);
} }
int Xorriso_parse_gpt_guid(struct XorrisO *xorriso, char *text, int flag) /* @param flag bit0= no error message
*/
int Xorriso_parse_guid(struct XorrisO *xorriso, char *text,
uint8_t guid[16], int flag)
{ {
int bin_count= 0, ret; int bin_count= 0, ret;
uint8_t u[16], tr; uint8_t u[16], tr;
if(strcmp(text, "random") == 0) {
xorriso->gpt_guid_mode= 0;
return(1);
}
if(strcmp(text, "modification-date") == 0 ||
strcmp(text, "volume_date_uuid") == 0) {
xorriso->gpt_guid_mode= 2;
return(1);
}
/* Try RFC 4122 : big endian XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX /* Try RFC 4122 : big endian XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Translate to UEFI: first three components to little-endian Translate to UEFI: first three components to little-endian
*/ */
if(strlen(text) == 36) { if(strlen(text) == 36) {
if(text[8] == '-' && text[13] == '-' && text[18] == '-' && text[23] == '-'){ if(text[8] == '-' && text[13] == '-' && text[18] == '-' && text[23] == '-'){
ret= Hex_to_bin(text, 4, &bin_count, u, 0); ret= Hex_to_bin(text, 4, &bin_count, u, 0);
if(ret < 0 || bin_count != 4) if(ret < 0 || bin_count != 4)
goto malformed; goto malformed;
tr= u[0]; u[0]= u[3]; u[3]= tr; tr= u[0]; u[0]= u[3]; u[3]= tr;
tr= u[1]; u[1]= u[2]; u[2]= tr; tr= u[1]; u[1]= u[2]; u[2]= tr;
skipping to change at line 3137 skipping to change at line 3137
ret= Hex_to_bin(text + 14, 2, &bin_count, u + 6, 0); ret= Hex_to_bin(text + 14, 2, &bin_count, u + 6, 0);
if(ret < 0 || bin_count != 2) if(ret < 0 || bin_count != 2)
goto malformed; goto malformed;
tr= u[6]; u[6]= u[7]; u[7]= tr; tr= u[6]; u[6]= u[7]; u[7]= tr;
ret= Hex_to_bin(text + 19, 2, &bin_count, u + 8, 0); ret= Hex_to_bin(text + 19, 2, &bin_count, u + 8, 0);
if(ret < 0 || bin_count != 2) if(ret < 0 || bin_count != 2)
goto malformed; goto malformed;
ret= Hex_to_bin(text + 24, 6, &bin_count, u + 10, 0); ret= Hex_to_bin(text + 24, 6, &bin_count, u + 10, 0);
if(ret < 0 || bin_count != 6) if(ret < 0 || bin_count != 6)
goto malformed; goto malformed;
xorriso->gpt_guid_mode= 1; memcpy(guid, u, 16);
memcpy(xorriso->gpt_guid, u, 16);
return(1); return(1);
} }
} }
if(strlen(text) == 32) { if(strlen(text) == 32) {
ret= Hex_to_bin(text, 16, &bin_count, u, 0); ret= Hex_to_bin(text, 16, &bin_count, u, 0);
if(ret < 0 || bin_count != 16) if(ret < 0 || bin_count != 16)
goto malformed; goto malformed;
xorriso->gpt_guid_mode= 1; memcpy(guid, u, 16);
memcpy(xorriso->gpt_guid, u, 16);
return(1); return(1);
} }
malformed:; malformed:;
sprintf(xorriso->info_text, "Malformed GUID string: "); if(!(flag & 1)) {
Text_shellsafe(text, xorriso->info_text, 1); sprintf(xorriso->info_text, "Malformed GUID string: ");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Text_shellsafe(text, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
}
return(0);
}
int Xorriso_parse_gpt_guid(struct XorrisO *xorriso, char *text, int flag)
{
int ret;
if(strcmp(text, "random") == 0) {
xorriso->gpt_guid_mode= 0;
return(1);
}
if(strcmp(text, "modification-date") == 0 ||
strcmp(text, "volume_date_uuid") == 0) {
xorriso->gpt_guid_mode= 2;
return(1);
}
ret= Xorriso_parse_guid(xorriso, text, xorriso->gpt_guid, 0);
if(ret <= 0)
return(ret);
xorriso->gpt_guid_mode= 1;
return(1);
}
/* @return Tells the recognition status
0= not recognized as GUID
1= non-EFI type GUID
2= EFI type GUID
*/
int Xorriso_parse_type_guid(struct XorrisO *xorriso, char *text,
uint8_t guid[16], int *mbr_type, int flag)
{
int j, ret;
static uint8_t efi_sys_uuid[16] = {
0x28, 0x73, 0x2a, 0xc1, 0x1f, 0xf8, 0xd2, 0x11,
0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b
};
ret= Xorriso_parse_guid(xorriso, text, guid, 1);
if(ret > 0) {
for(j= 0; j < 16; j++)
if(guid[j] != efi_sys_uuid[j])
break;
if(j >= 16) {
*mbr_type= 0xef;
return(2);
} else {
*mbr_type= 0x83;
return(1);
}
}
return(0); return(0);
} }
 End of changes. 8 change blocks. 
17 lines changed or deleted 67 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)