New option -file_size_limit, -as mkisofs now supports -iso-level 1 to 3

This commit is contained in:
2008-08-27 12:13:07 +00:00
parent f480d32ae5
commit 354c145c65
5 changed files with 192 additions and 93 deletions

View File

@ -1659,14 +1659,12 @@ int Xorriso_tree_graft_node(struct XorrisO *xorriso, IsoImage *volume,
struct stat stbuf;
char sfe[5*SfileadrL];
off_t size= 0;
/* At most: 100 extents with 4 GB - 2 kB each = 400 GB - 800 kB */
static off_t limit= ((off_t) 400) * ((off_t) 1024*1024*1024) - (off_t) 819200;
if(flag&8) {
if(cut_size > limit) {
if(cut_size > xorriso->file_size_limit && xorriso->file_size_limit > 0) {
sprintf(xorriso->info_text,
"File piece exceeds size limit of %.f bytes: %.f from %s\n",
(double) limit, (double) cut_size,
(double) xorriso->file_size_limit, (double) cut_size,
Text_shellsafe(disk_path, sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
@ -1687,10 +1685,11 @@ int Xorriso_tree_graft_node(struct XorrisO *xorriso, IsoImage *volume,
if(ret<=0)
goto ex;
return(1);
} else if(size > limit) {
} else if(size > xorriso->file_size_limit && xorriso->file_size_limit > 0) {
sprintf(xorriso->info_text,
"File exceeds size limit of %.f bytes: %s\n",
(double) limit, Text_shellsafe(disk_path, sfe, 0));
(double) xorriso->file_size_limit,
Text_shellsafe(disk_path, sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}