"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xorriso/check_media.c" between
xorriso-1.5.2.tar.gz and xorriso-1.5.4.tar.gz

About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.

check_media.c  (xorriso-1.5.2):check_media.c  (xorriso-1.5.4)
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. Provided under GPL version 2 or later.
This file contains the implementation of classes SpotlistiteM, SectorbitmaP, This file contains the implementation of classes SpotlistiteM, SectorbitmaP,
CheckmediajoB which perform verifying runs on media resp. images. CheckmediajoB which perform verifying runs on media resp. images.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "../config.h" #include "../config.h"
#endif #endif
skipping to change at line 565 skipping to change at line 565
m->async_chunks= 0; m->async_chunks= 0;
m->mode= 0; m->mode= 0;
m->start_time= time(NULL); m->start_time= time(NULL);
m->time_limit= 28800; m->time_limit= 28800;
m->item_limit= 100000; m->item_limit= 100000;
strcpy(m->abort_file_path, "/var/opt/xorriso/do_abort_check_media"); strcpy(m->abort_file_path, "/var/opt/xorriso/do_abort_check_media");
m->data_to_path[0]= 0; m->data_to_path[0]= 0;
m->data_to_fd= -1; m->data_to_fd= -1;
m->data_to_offset= 0; m->data_to_offset= 0;
m->data_to_limit= -1; m->data_to_limit= -1;
m->data_to_skip= 0;
m->patch_lba0= 0; m->patch_lba0= 0;
m->patch_lba0_msc1= -1; m->patch_lba0_msc1= -1;
m->sector_map_path[0]= 0; m->sector_map_path[0]= 0;
m->sector_map= NULL; m->sector_map= NULL;
m->map_with_volid= 0; m->map_with_volid= 0;
m->retry= 0; m->retry= 0;
m->report_mode= 0; m->report_mode= 0;
strcpy(m->event_severity, "ALL"); strcpy(m->event_severity, "ALL");
m->slow_threshold_seq= 1.0; m->slow_threshold_seq= 1.0;
return(1); return(1);
} }
int Checkmediajob_destroy(struct CheckmediajoB **o, int flag) int Checkmediajob_destroy(struct CheckmediajoB **o, int flag)
{ {
if((*o) == NULL) if((*o) == NULL)
return(0); return(0);
if((*o)->data_to_fd != -1) if((*o)->data_to_fd != -1 && strcmp((*o)->data_to_path, "-") != 0)
close((*o)->data_to_fd); close((*o)->data_to_fd);
Sectorbitmap_destroy(&((*o)->sector_map), 0); Sectorbitmap_destroy(&((*o)->sector_map), 0);
free((char *) *o); free((char *) *o);
*o= NULL; *o= NULL;
return(1); return(1);
} }
int Checkmediajob_copy(struct CheckmediajoB *from, struct CheckmediajoB *to, int Checkmediajob_copy(struct CheckmediajoB *from, struct CheckmediajoB *to,
int flag) int flag)
{ {
skipping to change at line 604 skipping to change at line 605
to->max_lba= from->max_lba; to->max_lba= from->max_lba;
to->min_block_size= from->min_block_size; to->min_block_size= from->min_block_size;
to->mode= from->mode; to->mode= from->mode;
to->time_limit= from->time_limit; to->time_limit= from->time_limit;
to->item_limit= from->item_limit; to->item_limit= from->item_limit;
strcpy(to->abort_file_path, from->abort_file_path); strcpy(to->abort_file_path, from->abort_file_path);
strcpy(to->data_to_path, from->data_to_path); strcpy(to->data_to_path, from->data_to_path);
/* not copied: data_to_fd */ /* not copied: data_to_fd */
to->data_to_offset= from->data_to_offset; to->data_to_offset= from->data_to_offset;
to->data_to_limit= from->data_to_limit; 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= from->patch_lba0;
to->patch_lba0_msc1= from->patch_lba0_msc1; to->patch_lba0_msc1= from->patch_lba0_msc1;
strcpy(to->sector_map_path, from->sector_map_path); strcpy(to->sector_map_path, from->sector_map_path);
/* not copied: sector_map */ /* not copied: sector_map */
to->map_with_volid= from->map_with_volid; to->map_with_volid= from->map_with_volid;
to->retry= from->retry; to->retry= from->retry;
to->report_mode= from->report_mode; to->report_mode= from->report_mode;
strcpy(to->event_severity, from->event_severity); strcpy(to->event_severity, from->event_severity);
to->slow_threshold_seq= from->slow_threshold_seq; to->slow_threshold_seq= from->slow_threshold_seq;
return(1); return(1);
skipping to change at line 1052 skipping to change at line 1054
*map= m; *map= m;
} }
return(1); return(1);
} }
int Xorriso_open_job_data_to(struct XorrisO *xorriso, int Xorriso_open_job_data_to(struct XorrisO *xorriso,
struct CheckmediajoB *job, int flag) struct CheckmediajoB *job, int flag)
{ {
if(job->data_to_path[0] == 0) if(job->data_to_path[0] == 0)
return(2); return(2);
job->data_to_fd= open(job->data_to_path, O_RDWR | O_CREAT | O_BINARY, if(strcmp(job->data_to_path, "-") == 0) {
S_IRUSR | S_IWUSR); 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_IRGRP | S_IWGRP |
S_IROTH | S_IWOTH);
}
if(job->data_to_fd == -1) { if(job->data_to_fd == -1) {
sprintf(xorriso->info_text, "Cannot open path "); sprintf(xorriso->info_text, "Cannot open path ");
Text_shellsafe(job->data_to_path, xorriso->info_text, 1); Text_shellsafe(job->data_to_path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE", 0);
return(0); return(0);
} }
return(1); return(1);
} }
int Xorriso_update_in_sector_map(struct XorrisO *xorriso, int Xorriso_update_in_sector_map(struct XorrisO *xorriso,
 End of changes. 5 change blocks. 
4 lines changed or deleted 11 lines changed or added

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