1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation.
3 * Copyright (c) 2009, Olivier MATZ <zer0@droids-corp.org>
12 #include "cmdline_private.h"
13 #include "cmdline_socket.h"
16 cmdline_file_new(cmdline_parse_ctx_t *ctx, const char *prompt, const char *path)
20 /* everything else is checked in cmdline_new() */
24 fd = open(path, O_RDONLY, 0);
26 dprintf("open() failed\n");
29 return cmdline_new(ctx, prompt, fd, -1);
33 cmdline_stdin_new(cmdline_parse_ctx_t *ctx, const char *prompt)
37 cl = cmdline_new(ctx, prompt, 0, 1);
46 cmdline_stdin_exit(struct cmdline *cl)