"Fossies" - the Fresh Open Source Software Archive  

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

opts_p_z.c  (libisoburn-1.5.0):opts_p_z.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-2017 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2018 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 options -p* to -z* as mentioned This file contains the implementation of options -p* to -z* as mentioned
in man page or info file derived from xorriso.texi. in man page or info file derived from xorriso.texi.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "../config.h" #include "../config.h"
#endif #endif
skipping to change at line 215 skipping to change at line 215
if(ret > 0) if(ret > 0)
ret= 0; ret= 0;
goto ex; goto ex;
} }
} }
ret= 1; ret= 1;
ex:; ex:;
xorriso->allow_graft_points= allow_graft_points_mem; xorriso->allow_graft_points= allow_graft_points_mem;
Sfile_make_argv("", "", &argc, &argv, 2); Sfile_make_argv("", "", &argc, &argv, 2);
Xorriso_free_meM(pathspec); Xorriso_free_meM(pathspec);
if(flag & 1) Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, 2);
Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, 2);
if(fp != NULL && fp != stdin) if(fp != NULL && fp != stdin)
fclose(fp); fclose(fp);
Xorriso_pacifier_callback(xorriso, "files added", xorriso->pacifier_count, Xorriso_pacifier_callback(xorriso, "files added", xorriso->pacifier_count,
xorriso->pacifier_total, "", 1); xorriso->pacifier_total, "", 1);
if(ret<=0) { if(ret<=0) {
sprintf(xorriso->info_text, "Aborted reading of file "); sprintf(xorriso->info_text, "Aborted reading of file ");
Text_shellsafe(adr, xorriso->info_text, 1); Text_shellsafe(adr, xorriso->info_text, 1);
sprintf(xorriso->info_text + strlen(xorriso->info_text), sprintf(xorriso->info_text + strlen(xorriso->info_text),
" in line number %d", linecount); " in line number %d", linecount);
skipping to change at line 669 skipping to change at line 668
if(ret<=0) if(ret<=0)
{ret= 2; goto ex;} {ret= 2; goto ex;}
} }
if(Sfile_str(indev, xorriso->indev, 0)<=0) if(Sfile_str(indev, xorriso->indev, 0)<=0)
{ret= -1; goto ex;} {ret= -1; goto ex;}
xorriso->volset_change_pending= 0; xorriso->volset_change_pending= 0;
ret= Xorriso_give_up_drive(xorriso, 1|8); ret= Xorriso_give_up_drive(xorriso, 1|8);
if(ret<=0) if(ret<=0)
goto ex; goto ex;
xorriso->image_start_mode&= ~(1<<31); /* reactivate eventual -load address */ xorriso->image_start_mode&= ~(1u<<31); /* reactivate eventual -load address */
ret= Xorriso_option_dev(xorriso, indev, 1|4); ret= Xorriso_option_dev(xorriso, indev, 1|4);
ex:; ex:;
Xorriso_free_meM(indev); Xorriso_free_meM(indev);
return(ret); return(ret);
} }
/* Option -rom_toc_scan */ /* Option -rom_toc_scan */
int Xorriso_option_rom_toc_scan(struct XorrisO *xorriso, char *mode, int flag) int Xorriso_option_rom_toc_scan(struct XorrisO *xorriso, char *mode, int flag)
{ {
int l; int l;
skipping to change at line 799 skipping to change at line 798
{ {
if(Sfile_str(xorriso->session_logfile, path, 0)<=0) if(Sfile_str(xorriso->session_logfile, path, 0)<=0)
return(-1); return(-1);
return(1); return(1);
} }
/* Option -setfacl_list alias -setfacl_listi */ /* Option -setfacl_list alias -setfacl_listi */
int Xorriso_option_setfacl_listi(struct XorrisO *xorriso, char *path, int flag) int Xorriso_option_setfacl_listi(struct XorrisO *xorriso, char *path, int flag)
{ {
int ret, eaten, line_size; int ret, eaten, line_size;
size_t buf_size= 0, buf_add= 64 * 1024, l, linecount= 0; size_t buf_size= 0, buf_add, l, linecount= 0, diff_buf_wpt;
char *line= NULL, *buf= NULL, *wpt, *new_buf, limit_text[80]; char *line= NULL, *buf= NULL, *wpt, *new_buf, limit_text[80];
char *file_path= NULL, *uid= NULL, *gid= NULL; char *file_path= NULL, *uid= NULL, *gid= NULL;
FILE *fp= NULL; FILE *fp= NULL;
line_size= SfileadrL * 4; line_size= SfileadrL * 4;
buf_add= line_size * 4;
Xorriso_alloc_meM(line, char, line_size); Xorriso_alloc_meM(line, char, line_size);
Xorriso_alloc_meM(file_path, char, SfileadrL); Xorriso_alloc_meM(file_path, char, SfileadrL);
Xorriso_alloc_meM(uid, char, 161); Xorriso_alloc_meM(uid, char, 161);
Xorriso_alloc_meM(gid, char, 161); Xorriso_alloc_meM(gid, char, 161);
Xorriso_pacifier_reset(xorriso, 0); Xorriso_pacifier_reset(xorriso, 0);
if(path[0]==0) { if(path[0]==0) {
sprintf(xorriso->info_text, "Empty file name given with -setfacl_list"); sprintf(xorriso->info_text, "Empty file name given with -setfacl_list");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;} {ret= 0; goto ex;}
skipping to change at line 891 skipping to change at line 891
l= strlen(line); l= strlen(line);
if(wpt + l + 2 - buf > (int) buf_size) { if(wpt + l + 2 - buf > (int) buf_size) {
if((int) (buf_size + buf_add) > xorriso->temp_mem_limit) { if((int) (buf_size + buf_add) > xorriso->temp_mem_limit) {
Sfile_scale((double) xorriso->temp_mem_limit, limit_text,5,1e4,1); Sfile_scale((double) xorriso->temp_mem_limit, limit_text,5,1e4,1);
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"-setfacl_list: List entry for a single file exceeds -temp_mem_limit %s", "-setfacl_list: List entry for a single file exceeds -temp_mem_limit %s",
limit_text); limit_text);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex; ret= 0; goto ex;
} }
diff_buf_wpt= wpt - buf;
buf_size+= buf_add; buf_size+= buf_add;
new_buf= realloc(buf, buf_size); new_buf= realloc(buf, buf_size);
if(new_buf == NULL) if(new_buf == NULL)
goto out_of_mem; goto out_of_mem;
buf= new_buf; buf= new_buf;
wpt= buf + diff_buf_wpt;
} }
memcpy(wpt, line, l); memcpy(wpt, line, l);
*(wpt + l)= '\n'; *(wpt + l)= '\n';
wpt+= l + 1; wpt+= l + 1;
*wpt= 0; *wpt= 0;
} }
if(wpt != buf && file_path[0]) { if(wpt != buf && file_path[0]) {
/* Commit last list */ /* Commit last list */
ret= Xorriso_perform_acl_from_list(xorriso, file_path, uid, gid, buf, 0); ret= Xorriso_perform_acl_from_list(xorriso, file_path, uid, gid, buf, 0);
if(ret<=0) if(ret<=0)
skipping to change at line 956 skipping to change at line 958
struct stat dir_stbuf; struct stat dir_stbuf;
ret= Xorriso_opt_args(xorriso, "-setfacl", argc, argv, *idx, &end_idx, &optc, ret= Xorriso_opt_args(xorriso, "-setfacl", argc, argv, *idx, &end_idx, &optc,
&optv, 0); &optv, 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
ret= Xorriso_normalize_acl_text(xorriso, acl_text, ret= Xorriso_normalize_acl_text(xorriso, acl_text,
&access_acl_text, &default_acl_text, 0); &access_acl_text, &default_acl_text, 0);
if(access_acl_text != NULL && default_acl_text != NULL) { if(access_acl_text != NULL && default_acl_text != NULL) {
sprintf(xorriso->info_text, "Access-ACL :\n%s", access_acl_text); strcpy(xorriso->info_text, "Access-ACL :\n");
Xorriso_set_info_text(xorriso, access_acl_text, 2000, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
sprintf(xorriso->info_text, "Default-ACL :\n%s", default_acl_text); strcpy(xorriso->info_text, "Default-ACL :\n");
Xorriso_set_info_text(xorriso, default_acl_text, 2000, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
} else if(access_acl_text == NULL && default_acl_text == NULL) { } else if(access_acl_text == NULL && default_acl_text == NULL) {
sprintf(xorriso->info_text, "Will delete Access-ACL and Default-ACL"); sprintf(xorriso->info_text, "Will delete Access-ACL and Default-ACL");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
} }
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
for(i= 0; i<optc; i++) { for(i= 0; i<optc; i++) {
if(flag&1) { if(flag&1) {
skipping to change at line 1933 skipping to change at line 1937
"GNU ", "GNU ",
#else #else
"", "",
#endif /* ! Xorriso_GNU_xorrisO */ #endif /* ! Xorriso_GNU_xorrisO */
Xorriso_header_version_majoR, Xorriso_header_version_minoR, Xorriso_header_version_majoR, Xorriso_header_version_minoR,
Xorriso_header_version_micrO, Xorriso_program_patch_leveL); Xorriso_header_version_micrO, Xorriso_program_patch_leveL);
Xorriso_result(xorriso, 0); Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, sprintf(xorriso->result_line,
"ISO 9660 Rock Ridge filesystem manipulator and CD/DVD/BD burn program\n"); "ISO 9660 Rock Ridge filesystem manipulator and CD/DVD/BD burn program\n");
sprintf(xorriso->result_line+strlen(xorriso->result_line), sprintf(xorriso->result_line+strlen(xorriso->result_line),
"Copyright (C) 2017, Thomas Schmitt <scdbackup@gmx.net>, libburnia project.\n"); "Copyright (C) 2019, Thomas Schmitt <scdbackup@gmx.net>, libburnia project.\n");
Xorriso_result(xorriso, 0); Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, sprintf(xorriso->result_line,
"xorriso version : %d.%d.%d%s\n", "xorriso version : %d.%d.%d%s\n",
Xorriso_header_version_majoR, Xorriso_header_version_minoR, Xorriso_header_version_majoR, Xorriso_header_version_minoR,
Xorriso_header_version_micrO, Xorriso_program_patch_leveL); Xorriso_header_version_micrO, Xorriso_program_patch_leveL);
Xorriso_result(xorriso, 0); Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, "Version timestamp : %s\n",Xorriso_timestamP); sprintf(xorriso->result_line, "Version timestamp : %s\n",Xorriso_timestamP);
Xorriso_result(xorriso, 0); Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, sprintf(xorriso->result_line,
"Build timestamp : %s\n",Xorriso_build_timestamP); "Build timestamp : %s\n",Xorriso_build_timestamP);
 End of changes. 10 change blocks. 
8 lines changed or deleted 12 lines changed or added

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