Made use of new libisofs call iso_image_update_sizes()
This commit is contained in:
parent
51fe94c159
commit
0d19cd3150
@ -1877,6 +1877,7 @@ struct FindjoB {
|
||||
int start_lba;
|
||||
int end_lba;
|
||||
int damage_filter; /* -1=only undamaged , 0=all , 1=only damaged */
|
||||
int commit_filter; /* bit0= test -pending_data : uncommitted regular files */
|
||||
|
||||
/* 0= echo
|
||||
1= rm (also rmdir)
|
||||
@ -1928,6 +1929,7 @@ int Findjob_new(struct FindjoB **o, char *start_path, int flag)
|
||||
m->start_lba= -1;
|
||||
m->end_lba= -1;
|
||||
m->damage_filter= 0;
|
||||
m->commit_filter= 0;
|
||||
m->action= 0; /* print */
|
||||
m->target= NULL; /* a mere pointer, not managed memory */
|
||||
m->user= 0;
|
||||
@ -2052,6 +2054,22 @@ int Findjob_get_lba_damage_filter(struct FindjoB *o, int *start_lba,
|
||||
}
|
||||
|
||||
|
||||
int Findjob_set_commit_filter(struct FindjoB *o, int mask, int values,
|
||||
int flag)
|
||||
{
|
||||
o->commit_filter&= ~mask;
|
||||
o->commit_filter|= (mask & values);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int Findjob_get_commit_filter(struct FindjoB *o, int *commit_filter, int flag)
|
||||
{
|
||||
*commit_filter= o->commit_filter;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
/* @return 0=no match , 1=match , <0 = error
|
||||
*/
|
||||
int Findjob_test(struct FindjoB *o, char *name,
|
||||
@ -11069,6 +11087,8 @@ not_enough_arguments:;
|
||||
sscanf(argv[i-1], "%d", &start_lba);
|
||||
sscanf(argv[i], "%d", &count);
|
||||
Findjob_set_lba_range(job, start_lba, count, 0);
|
||||
} else if(strcmp(argv[i], "-pending_data")==0) {
|
||||
Findjob_set_commit_filter(job, 1, 1, 0);
|
||||
} else if(strcmp(argv[i], "-exec")==0) {
|
||||
if(i+1>=end_idx)
|
||||
goto not_enough_arguments;
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2008.09.07.144714"
|
||||
#define Xorriso_timestamP "2008.09.08.094748"
|
||||
|
@ -841,7 +841,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
struct burn_session **sessions;
|
||||
struct burn_track **tracks;
|
||||
enum burn_disc_status s;
|
||||
IsoImage *image = NULL;
|
||||
IsoImage *image= NULL;
|
||||
ElToritoBootImage *bootimg;
|
||||
|
||||
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
|
||||
@ -897,8 +897,10 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
}
|
||||
|
||||
ret= isoburn_igopt_new(&sopts, 0);
|
||||
if(ret<=0)
|
||||
if(ret<=0) {
|
||||
Xorriso_process_msg_queues(xorriso, 0);
|
||||
return(ret);
|
||||
}
|
||||
relax= isoburn_igopt_allow_deep_paths;
|
||||
|
||||
/* Adjust or discard boot image */
|
||||
@ -969,6 +971,20 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
ret= Xorriso_eval_problem_status(xorriso, 1, 0);
|
||||
if(ret<0)
|
||||
{ret= 0; goto ex;}
|
||||
|
||||
/* >>> omit iso_image_update_sizes if the image was filled up very quickly */;
|
||||
|
||||
ret= iso_image_update_sizes(image);
|
||||
if(ret < 0) {
|
||||
Xorriso_process_msg_queues(xorriso, 0);
|
||||
ret= Xorriso_eval_problem_status(xorriso, 1, 0);
|
||||
if(ret<0)
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Xorriso_set_abort_severity(xorriso, 1);
|
||||
if (xorriso->grow_blindly_msc2 >= 0 &&
|
||||
xorriso->out_drive_handle != xorriso->in_drive_handle) {
|
||||
@ -5858,7 +5874,7 @@ int Xorriso_findi_test(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
struct stat *boss_stbuf, struct stat *stbuf,
|
||||
int depth, int flag)
|
||||
{
|
||||
int ret, start_lba, end_lba, damage_filter;
|
||||
int ret, start_lba, end_lba, damage_filter, commit_filter, lba;
|
||||
off_t damage_start, damage_end, size;
|
||||
int lba_count, *file_end_lbas= NULL, *file_start_lbas= NULL, i;
|
||||
|
||||
@ -5886,6 +5902,14 @@ int Xorriso_findi_test(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
}
|
||||
Findjob_get_commit_filter(job, &commit_filter, 0);
|
||||
if(commit_filter & 1) { /* -pending_data */
|
||||
if(!LIBISO_ISREG(node))
|
||||
{ret= 0; goto ex;}
|
||||
ret= Xorriso__file_start_lba(node, &lba, 0);
|
||||
if(ret > 0 && lba >= 0)
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
ret= 1;
|
||||
ex:;
|
||||
if(file_start_lbas != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user