On 15-Nov-17 3:45 PM, Xueming Li wrote:
Add echo option to echo commandline to screen when running loaded
scripts from file.
Signed-off-by: Xueming Li <xuemi...@mellanox.com>
---
<...snip...>
@@ -86,7 +87,7 @@ cmdline_file_new(cmdline_parse_ctx_t *ctx, const char
*prompt, const char *path)
dprintf("open() failed\n");
return NULL;
}
- return cmdline_new(ctx, prompt, fd, -1);
+ return cmdline_new(ctx, prompt, fd, echo ? 1 : -1);
This should probably be "echo ? STDOUT_FILENO : -1", to make the
intention clearer.
--
Thanks,
Anatoly