Reporting commands and their arguments as DEBUG messages before execution

master
Thomas Schmitt 12 years ago
parent 2027441330
commit 6f7d084414
  1. 19
      xorriso/parse_exec.c
  2. 2
      xorriso/xorriso_timestamp.h

@ -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)

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

Loading…
Cancel
Save