Removed some outdated code parts
This commit is contained in:
parent
25c4acaf79
commit
a7cfdfeadb
@ -6557,56 +6557,9 @@ dir_not_removed:;
|
||||
}
|
||||
if(xorriso->request_to_abort)
|
||||
{ret= 3; goto ex;}
|
||||
|
||||
#ifdef NIX
|
||||
|
||||
while((xorriso->do_reassure==1 || (xorriso->do_reassure==2 && !(flag&4)))
|
||||
&& !xorriso->request_not_to_ask) {
|
||||
/* ls -ld */
|
||||
Xorriso_lsx_filev(xorriso, xorriso->wdx, 1, &path, (off_t) 0, 1|2|8);
|
||||
if(is_dir) /* du -s */
|
||||
Xorriso_lsx_filev(xorriso, xorriso->wdx, 1, &path, (off_t) 0, 2|4);
|
||||
if(flag&8)
|
||||
sprintf(xorriso->info_text,
|
||||
"File exists. Remove ? n= keep old, y= remove, x= abort, @= stop asking\n");
|
||||
else
|
||||
sprintf(xorriso->info_text,
|
||||
"Remove above file ? n= keep it, y= remove it, x= abort, @= stop asking\n");
|
||||
Xorriso_info(xorriso, 4);
|
||||
ret= Xorriso_request_confirmation(xorriso, 1|2|4|16);
|
||||
if(ret<=0)
|
||||
goto ex;
|
||||
if(xorriso->request_to_abort) {
|
||||
sprintf(xorriso->info_text,
|
||||
"Removal operation aborted by user before file: %s",
|
||||
Text_shellsafe(path, sfe, 0));
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||
ret= 3; goto ex;
|
||||
}
|
||||
if(ret==3)
|
||||
continue;
|
||||
if(ret==6) /* yes */
|
||||
break;
|
||||
if(ret==4) { /* yes, do not ask again */
|
||||
xorriso->request_not_to_ask= 1;
|
||||
break;
|
||||
}
|
||||
if(ret==1) { /* no */
|
||||
sprintf(xorriso->info_text, "Kept in existing state: %s",
|
||||
Text_shellsafe(path, sfe, 0));
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||
ret= 3; goto ex;
|
||||
}
|
||||
}
|
||||
|
||||
#else /* NIX */
|
||||
|
||||
ret= Xorriso_reassure_restore(xorriso, path, (flag&(4|8)) | !!is_dir);
|
||||
if(ret<=0 || ret==3)
|
||||
goto ex;
|
||||
|
||||
#endif /* ! NIX */
|
||||
|
||||
if(is_dir)
|
||||
ret= rmdir(path);
|
||||
else
|
||||
@ -8842,15 +8795,6 @@ int Xorriso_option_cpx(struct XorrisO *xorriso, int argc, char **argv,
|
||||
ret= 0; goto ex;
|
||||
}
|
||||
|
||||
/* <<<
|
||||
if(xorriso->volset_change_pending) {
|
||||
sprintf(xorriso->info_text,
|
||||
"-cp*x: Image changes pending. May not copy from image to disk.\n");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
ret= 0; goto ex;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Perform copying */
|
||||
Xorriso_pacifier_reset(xorriso, 0);
|
||||
for(i= 0; i<optc && !xorriso->request_to_abort; i++) {
|
||||
@ -11772,9 +11716,6 @@ return:
|
||||
*/
|
||||
{
|
||||
int ret, was_dashed, end_ret, num1, num2;
|
||||
#ifdef NIX
|
||||
int arg_count;
|
||||
#endif
|
||||
char *cmd, *original_cmd, cmd_data[2*SfileadrL], *arg1, *arg2, type_text[5];
|
||||
|
||||
if(xorriso==NULL)
|
||||
@ -11805,28 +11746,7 @@ next_command:;
|
||||
goto eval_any_problems;
|
||||
was_dashed= ret;
|
||||
|
||||
#ifdef NIX
|
||||
ret= Xorriso_count_args(xorriso, argc-(*idx), argv+(*idx), &arg_count, 0);
|
||||
if(ret==1) {
|
||||
sprintf(xorriso->info_text, "Option '%s' : %d :", original_cmd, arg_count);
|
||||
if(arg_count>0 && (*idx)+arg_count < argc)
|
||||
sprintf(xorriso->info_text+strlen(xorriso->info_text), " '%s'",
|
||||
argv[(*idx)+1]);
|
||||
if(arg_count>1 && (*idx)+arg_count < argc)
|
||||
sprintf(xorriso->info_text+strlen(xorriso->info_text), " '%s'",
|
||||
argv[(*idx)+2]);
|
||||
if(arg_count>2 && (*idx)+arg_count < argc)
|
||||
sprintf(xorriso->info_text+strlen(xorriso->info_text), " ... '%s'",
|
||||
argv[(*idx)+arg_count]);
|
||||
else if(arg_count>3 && (*idx)+arg_count-1 < argc)
|
||||
sprintf(xorriso->info_text+strlen(xorriso->info_text), " ... '%s'",
|
||||
argv[(*idx)+arg_count-1]);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
|
||||
}
|
||||
#endif /* NIX */
|
||||
|
||||
(*idx)++;
|
||||
|
||||
if((*idx)<argc)
|
||||
arg1= argv[(*idx)];
|
||||
else
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2008.06.09.134432"
|
||||
#define Xorriso_timestamP "2008.06.09.165735"
|
||||
|
@ -2438,9 +2438,10 @@ unsupported_type:;
|
||||
|
||||
/* @param flag bit0= in_node is valid, do not resolve img_path
|
||||
bit1= test mode: print DEBUG messages
|
||||
@return <0 = error, 0 = not identical regular files , 1 = identical
|
||||
@return <0 = error,
|
||||
0 = surely not identical regular files ,
|
||||
1 = surely identical
|
||||
2 = potentially depending on unknown disk file (e.g. -cut_out)
|
||||
and hitting an existing disk file object
|
||||
*/
|
||||
int Xorriso_restore_is_identical(struct XorrisO *xorriso, void *in_node,
|
||||
char *img_path, char *disk_path,
|
||||
@ -2457,6 +2458,8 @@ int Xorriso_restore_is_identical(struct XorrisO *xorriso, void *in_node,
|
||||
struct stat stbuf;
|
||||
|
||||
memset(type_text, 0, 5);
|
||||
if(!xorriso->volset_change_pending)
|
||||
return(0);
|
||||
if(flag&1) {
|
||||
node= (IsoNode *) in_node;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user