"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xorriso/disk_ops.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.

disk_ops.c  (libisoburn-1.5.0):disk_ops.c  (libisoburn-1.5.2)
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2019 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 actions on onjects of disk This file contains the implementation of actions on onjects of disk
filesystems. filesystems.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "../config.h" #include "../config.h"
#endif #endif
skipping to change at line 338 skipping to change at line 338
"Cannot add new item to link loop prevention stack"); "Cannot add new item to link loop prevention stack");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", flag&1); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", flag&1);
return(-1); return(-1);
} }
*link_stack= litm; *link_stack= litm;
return(1); return(1);
} }
/* @param flag bit0= do not only sum up sizes but also print subdirs /* @param flag bit0= do not only sum up sizes but also print subdirs
bit1= this is a recursion bit1= this is a recursion
bit2= do not report result by Xorriso_result()
@return <=0 error , 1 ok , 2 could not open directory @return <=0 error , 1 ok , 2 could not open directory
*/ */
int Xorriso_show_dux_subs(struct XorrisO *xorriso, int Xorriso_show_dux_subs(struct XorrisO *xorriso,
char *abs_path, char *rel_path, off_t *size, char *abs_path, char *rel_path, off_t *size,
off_t boss_mem, off_t boss_mem,
struct LinkiteM *link_stack, struct LinkiteM *link_stack,
int flag) int flag)
{ {
int i, ret, no_sort= 0, filec= 0, l, j, fc, no_dive, is_link; int i, ret, no_sort= 0, filec= 0, l, j, fc, no_dive, is_link;
char **filev= NULL, *namept; char **filev= NULL, *namept;
skipping to change at line 558 skipping to change at line 559
/* /*
sub_size+= stbuf.st_size+strlen(namept)+1; sub_size+= stbuf.st_size+strlen(namept)+1;
*/ */
sub_size+= stbuf.st_size+2048; sub_size+= stbuf.st_size+2048;
if(sub_size>0) if(sub_size>0)
(*size)+= sub_size; (*size)+= sub_size;
report_size= sub_size/1024; report_size= sub_size/1024;
if(report_size*1024<sub_size) if(report_size*1024<sub_size)
report_size++; report_size++;
if(xorriso->sh_style_result) if(!(flag & 4)) {
sprintf(xorriso->result_line, "%-7.f ",(double) (report_size)); if(xorriso->sh_style_result)
else sprintf(xorriso->result_line, "%-7.f ",(double) (report_size));
sprintf(xorriso->result_line, "%7.f ",(double) (report_size)); else
sprintf(xorriso->result_line+strlen(xorriso->result_line), "%s\n", sprintf(xorriso->result_line, "%7.f ",(double) (report_size));
Xorriso_esc_filepath(xorriso,show_path, sfe, 0)); sprintf(xorriso->result_line+strlen(xorriso->result_line), "%s\n",
Xorriso_result(xorriso, 0); Xorriso_esc_filepath(xorriso,show_path, sfe, 0));
Xorriso_result(xorriso, 0);
}
} }
ret= 1; ret= 1;
ex:; ex:;
Xorriso_free_meM(sfe); Xorriso_free_meM(sfe);
Xorriso_free_meM(path); Xorriso_free_meM(path);
Xorriso_free_meM(show_path); Xorriso_free_meM(show_path);
Xorriso_free_meM(name); Xorriso_free_meM(name);
Linkitem_reset_stack(&own_link_stack, link_stack, 0); Linkitem_reset_stack(&own_link_stack, link_stack, 0);
Dirseq_destroy(&dirseq, 0); Dirseq_destroy(&dirseq, 0);
skipping to change at line 892 skipping to change at line 895
Xorriso_local_getfacl(xorriso, path, &acl_text, 16); Xorriso_local_getfacl(xorriso, path, &acl_text, 16);
ret= Xorriso_format_ls_l(xorriso, &stbuf, (acl_text != NULL) << 1); ret= Xorriso_format_ls_l(xorriso, &stbuf, (acl_text != NULL) << 1);
Xorriso_local_getfacl(xorriso, path, &acl_text, 1 << 15); Xorriso_local_getfacl(xorriso, path, &acl_text, 1 << 15);
if(ret<=0) if(ret<=0)
continue; continue;
if(S_ISLNK(stbuf.st_mode)) { if(S_ISLNK(stbuf.st_mode)) {
ret= Xorriso_resolve_link(xorriso, path, link_target, 1); ret= Xorriso_resolve_link(xorriso, path, link_target, 1);
if(ret<=0) if(ret<=0)
link_target[0]= 0; link_target[0]= 0;
} }
} else if(flag&4) { /* -du or -dus */ } else if(flag&4) { /* -dux or -dusx */
size= stbuf.st_size; size= stbuf.st_size;
if(S_ISDIR(stbuf.st_mode)) { if(S_ISDIR(stbuf.st_mode)) {
ret= Xorriso_show_dux_subs(xorriso, path, filev[i], &size, boss_mem, ret= Xorriso_show_dux_subs(xorriso, path, filev[i], &size, boss_mem,
NULL, flag&1); NULL, flag&1);
if(ret<0) if(ret<0)
{ret= -1; goto ex;} {ret= -1; goto ex;}
if(ret==0) if(ret==0)
continue; continue;
} }
if(xorriso->sh_style_result) if(xorriso->sh_style_result)
skipping to change at line 1174 skipping to change at line 1177
ret= 1; ret= 1;
} else if(action==16) { /* not_in_iso */ } else if(action==16) { /* not_in_iso */
ret= Xorriso_compare_2_files(xorriso, abs_path, iso_path, abs_path+dpl, ret= Xorriso_compare_2_files(xorriso, abs_path, iso_path, abs_path+dpl,
&compare_result, 4); &compare_result, 4);
if(ret<xorriso->find_compare_result) if(ret<xorriso->find_compare_result)
xorriso->find_compare_result= ret; xorriso->find_compare_result= ret;
if(ret>=0) if(ret>=0)
ret= 1; ret= 1;
} else if(action==18) { /* add_missing */ } else if(action==18) { /* add_missing */
ret= Xorriso_compare_2_files(xorriso, abs_path, iso_path, abs_path+dpl, ret= Xorriso_compare_2_files(xorriso, abs_path, iso_path, abs_path+dpl,
&compare_result, 4|(1<<31)); &compare_result, 4|(1u<<31));
if(ret<xorriso->find_compare_result) if(ret<xorriso->find_compare_result)
xorriso->find_compare_result= ret; xorriso->find_compare_result= ret;
if(ret==0) { if(ret==0) {
uret= Xorriso_update_interpreter(xorriso, NULL, NULL, compare_result, uret= Xorriso_update_interpreter(xorriso, NULL, NULL, compare_result,
abs_path, iso_path, ((flag&1)<<2) | 2); abs_path, iso_path, ((flag&1)<<2) | 2);
if(uret<=0) if(uret<=0)
ret= 0; ret= 0;
} }
if(ret>=0) if(ret>=0)
ret= 1; ret= 1;
 End of changes. 5 change blocks. 
10 lines changed or deleted 13 lines changed or added

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