#endif
struct cmdline *
-cmdline_file_new(cmdline_parse_ctx_t *ctx, const char *prompt, const char *path)
+cmdline_file_new(cmdline_parse_ctx_t *ctx, const char *prompt, const char *path,
+ int use_stdout)
{
int fd;
fd = open(path, O_RDONLY, 0);
dprintf("open() failed\n");
return NULL;
}
- return (cmdline_new(ctx, prompt, fd, -1));
+ return (cmdline_new(ctx, prompt, fd, use_stdout ? 1 : -1));
}
struct cmdline *