New command -extract_boot_images
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
|
||||
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
|
||||
|
||||
Copyright 2007-2015 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
Copyright 2007-2020 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
|
||||
@ -587,6 +587,7 @@ int Checkmediajob_new(struct CheckmediajoB **o, int flag)
|
||||
m->data_to_fd= -1;
|
||||
m->data_to_offset= 0;
|
||||
m->data_to_limit= -1;
|
||||
m->data_to_skip= 0;
|
||||
m->patch_lba0= 0;
|
||||
m->patch_lba0_msc1= -1;
|
||||
m->sector_map_path[0]= 0;
|
||||
@ -604,7 +605,7 @@ int Checkmediajob_destroy(struct CheckmediajoB **o, int flag)
|
||||
{
|
||||
if((*o) == NULL)
|
||||
return(0);
|
||||
if((*o)->data_to_fd != -1 && strcmp((*o)->data_to_path, "-") == 0)
|
||||
if((*o)->data_to_fd != -1 && strcmp((*o)->data_to_path, "-") != 0)
|
||||
close((*o)->data_to_fd);
|
||||
Sectorbitmap_destroy(&((*o)->sector_map), 0);
|
||||
free((char *) *o);
|
||||
@ -628,6 +629,7 @@ int Checkmediajob_copy(struct CheckmediajoB *from, struct CheckmediajoB *to,
|
||||
/* not copied: data_to_fd */
|
||||
to->data_to_offset= from->data_to_offset;
|
||||
to->data_to_limit= from->data_to_limit;
|
||||
to->data_to_skip= from->data_to_skip;
|
||||
to->patch_lba0= from->patch_lba0;
|
||||
to->patch_lba0_msc1= from->patch_lba0_msc1;
|
||||
strcpy(to->sector_map_path, from->sector_map_path);
|
||||
@ -1086,7 +1088,8 @@ int Xorriso_open_job_data_to(struct XorrisO *xorriso,
|
||||
job->data_to_fd= 1;
|
||||
} else {
|
||||
job->data_to_fd= open(job->data_to_path, O_RDWR | O_CREAT | O_BINARY,
|
||||
S_IRUSR | S_IWUSR);
|
||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP |
|
||||
S_IROTH | S_IWOTH);
|
||||
}
|
||||
if(job->data_to_fd == -1) {
|
||||
sprintf(xorriso->info_text, "Cannot open path ");
|
||||
|
Reference in New Issue
Block a user