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