Skip to content
Snippets Groups Projects
Commit 1bbd7cf1 authored by Moe Jette's avatar Moe Jette
Browse files

fix command line output in debug mode for srun, et. al.

previously only printed the last argv value.
parent a695b8e4
No related branches found
No related tags found
No related merge requests found
...@@ -624,12 +624,17 @@ search_path(char *cwd, char *cmd, bool check_current_dir, int access_mode) ...@@ -624,12 +624,17 @@ search_path(char *cwd, char *cmd, bool check_current_dir, int access_mode)
char *print_commandline(const int script_argc, char **script_argv) char *print_commandline(const int script_argc, char **script_argv)
{ {
int i; int i;
char buf[256]; char tmp[256], *out_buf = NULL, *prefix;
buf[0] = '\0'; for (i = 0; i < script_argc; i++) {
for (i = 0; i < script_argc; i++) if (out_buf)
snprintf(buf, 256, "%s", script_argv[i]); prefix = " ";
return xstrdup(buf); else
prefix = "";
snprintf(tmp, 256, "%s%s", prefix, script_argv[i]);
xstrcat(out_buf, tmp);
}
return out_buf;
} }
char *print_geometry(const uint16_t *geometry) char *print_geometry(const uint16_t *geometry)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment