Reporting commands and their arguments as DEBUG messages before execution

This commit is contained in:
Thomas Schmitt 2011-06-27 17:24:59 +00:00
parent 2027441330
commit 6f7d084414
2 changed files with 18 additions and 3 deletions

View File

@ -581,7 +581,7 @@ return:
*/
{
int ret, was_dashed, end_ret, num1, num2, cmd_data_size= 2 * SfileadrL;
int mem_idx;
int mem_idx, arg_count, i;
char *cmd, *original_cmd, *cmd_data= NULL, *arg1, *arg2;
Xorriso_alloc_meM(cmd_data, char, cmd_data_size);
@ -610,6 +610,22 @@ next_command:;
}
}
ret= Xorriso_count_args(xorriso, argc - *idx, argv + *idx, &arg_count, 1);
if((ret == 1 || ret == 2) &&
strcmp(argv[*idx], xorriso->list_delimiter) != 0) {
sprintf(xorriso->info_text, "Command: %s", argv[*idx]);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
for(i= 1; i <= arg_count && *idx + i < argc; i++) {
sprintf(xorriso->info_text, "Argument: %s", argv[*idx + i]);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
}
if(*idx + arg_count >= argc) {
sprintf(xorriso->info_text, "Missing arguments: %d",
*idx + arg_count + 1 - argc);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
}
}
xorriso->prepended_wd= 0;
xorriso->request_to_abort= xorriso->request_not_to_ask= 0;
Xorriso_set_problem_status(xorriso, "", 0);
@ -622,7 +638,6 @@ next_command:;
goto add_plain_argument;
}
was_dashed= 0;
ret= Xorriso_normalize_command(xorriso, original_cmd, -1,
cmd_data, cmd_data_size, &cmd, 0);
if(ret<0)

View File

@ -1 +1 @@
#define Xorriso_timestamP "2011.06.27.160728"
#define Xorriso_timestamP "2011.06.27.172423"