"Fossies" - the Fresh Open Source Software Archive  

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

opts_i_o.c  (xorriso-1.5.2):opts_i_o.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-2019 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 options as mentioned in man page This file contains the implementation of options as mentioned in man page
or info file derived from xorriso.texi. 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 101 skipping to change at line 101
else if(strcmp(mode, "on")==0) else if(strcmp(mode, "on")==0)
xorriso->do_joliet= 1; xorriso->do_joliet= 1;
else { else {
sprintf(xorriso->info_text, "-joliet: unknown mode '%s'", mode); sprintf(xorriso->info_text, "-joliet: unknown mode '%s'", mode);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0); return(0);
} }
return(1); return(1);
} }
/* Command -joliet_map */
int Xorriso_option_joliet_map(struct XorrisO *xorriso, char *mode, int flag)
{
if(strcmp(mode, "unmapped") == 0) {
xorriso->joliet_map= 0;
} else if(strcmp(mode, "stripped") == 0) {
xorriso->joliet_map= 1;
} else {
sprintf(xorriso->info_text, "-joliet_map: unknown mode '%s'", mode);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
return(0);
}
return(1);
}
/* Command -launch_frontend */ /* Command -launch_frontend */
int Xorriso_option_launch_frontend(struct XorrisO *xorriso, int Xorriso_option_launch_frontend(struct XorrisO *xorriso,
int argc, char **argv, int *idx, int flag) int argc, char **argv, int *idx, int flag)
{ {
int ret, end_idx; int ret, end_idx;
end_idx= Xorriso_end_idx(xorriso, argc, argv, *idx, 1); end_idx= Xorriso_end_idx(xorriso, argc, argv, *idx, 1);
if(xorriso->launch_frontend_banned) { if(xorriso->launch_frontend_banned) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
skipping to change at line 1714 skipping to change at line 1729
if(ret!=1) if(ret!=1)
return(ret); return(ret);
return(!was_failure); return(!was_failure);
} }
/* Option -osirrox "on"|"off" */ /* Option -osirrox "on"|"off" */
int Xorriso_option_osirrox(struct XorrisO *xorriso, char *mode, int flag) int Xorriso_option_osirrox(struct XorrisO *xorriso, char *mode, int flag)
{ {
int l, allow_restore; int l, allow_restore;
char *npt, *cpt; char *npt, *cpt;
double num= 0.0;
allow_restore= xorriso->allow_restore; allow_restore= xorriso->allow_restore;
npt= cpt= mode; npt= cpt= mode;
for(cpt= mode; npt!=NULL; cpt= npt+1) { for(cpt= mode; npt!=NULL; cpt= npt+1) {
npt= strchr(cpt,':'); npt= strchr(cpt,':');
if(npt==NULL) if(npt==NULL)
l= strlen(cpt); l= strlen(cpt);
else else
l= npt-cpt; l= npt-cpt;
skipping to change at line 1760 skipping to change at line 1776
else if(strncmp(cpt, "sort_lba_off", l)==0 && l >= 12) else if(strncmp(cpt, "sort_lba_off", l)==0 && l >= 12)
xorriso->do_restore_sort_lba= 0; xorriso->do_restore_sort_lba= 0;
else if(strncmp(cpt, "o_excl_on", l)==0 && l >= 9) else if(strncmp(cpt, "o_excl_on", l)==0 && l >= 9)
xorriso->drives_exclusive= 1; xorriso->drives_exclusive= 1;
else if(strncmp(cpt, "o_excl_off", l)==0 && l >= 10) else if(strncmp(cpt, "o_excl_off", l)==0 && l >= 10)
xorriso->drives_exclusive= 0; xorriso->drives_exclusive= 0;
else if(strncmp(cpt, "strict_acl_on", l)==0 && l >= 13) else if(strncmp(cpt, "strict_acl_on", l)==0 && l >= 13)
xorriso->do_strict_acl|= 1; xorriso->do_strict_acl|= 1;
else if(strncmp(cpt, "strict_acl_off", l)==0 && l >= 14) else if(strncmp(cpt, "strict_acl_off", l)==0 && l >= 14)
xorriso->do_strict_acl&= ~1; xorriso->do_strict_acl&= ~1;
else { else if(strncmp(cpt, "check_md5_on", l) == 0 && l >= 12) {
xorriso->do_md5|= 1 << 6;
xorriso->do_md5&= ~(2 << 6);
} else if(strncmp(cpt, "check_md5_force", l)==0 && l >= 15) {
xorriso->do_md5|= 3 << 6;
} else if(strncmp(cpt, "check_md5_off", l)==0 && l >= 13) {
xorriso->do_md5&= ~(3 << 6);
} else if(strncmp(cpt, "sparse=", 7) == 0 && l >= 7) {
if(strncmp(cpt + 7, "off", 3) == 0 && l == 10) {
num= 0.0;
} else {
Xorriso__parse_size_param(cpt, 7, l, &num);
if(num < 1.0)
num= 0.0;
if(num > 1.0 * 1024.0 * 1024.0 * 1024.0) {
strcpy(xorriso->info_text,
"osirrox sparse= too large (allowed: off, 1 to 1g)");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
}
xorriso->sparse_min_gap= num;
} else {
unknown_mode:; unknown_mode:;
sprintf(xorriso->info_text, "-osirrox: unknown mode '%s'", cpt); sprintf(xorriso->info_text, "-osirrox: unknown mode '%s'", cpt);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0); return(0);
} }
} }
if(allow_restore > 0 && xorriso->allow_restore == -1) { if(allow_restore > 0 && xorriso->allow_restore == -1) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"-osirrox: was already permanently disabled by setting 'banned'"); "-osirrox: was already permanently disabled by setting 'banned'");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
 End of changes. 4 change blocks. 
2 lines changed or deleted 40 lines changed or added

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