aboutsummaryrefslogtreecommitdiff
path: root/libbb/wfopen_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/wfopen_input.c')
-rw-r--r--libbb/wfopen_input.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libbb/wfopen_input.c b/libbb/wfopen_input.c
index 46ff7a6de..422a58ecf 100644
--- a/libbb/wfopen_input.c
+++ b/libbb/wfopen_input.c
@@ -4,7 +4,7 @@
4 * 4 *
5 * Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org> 5 * Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org>
6 * 6 *
7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9 9
10/* A number of applets need to open a file for reading, where the filename 10/* A number of applets need to open a file for reading, where the filename
@@ -46,3 +46,11 @@ int FAST_FUNC open_or_warn_stdin(const char *filename)
46 46
47 return fd; 47 return fd;
48} 48}
49
50int FAST_FUNC xopen_stdin(const char *filename)
51{
52 int fd = open_or_warn_stdin(filename);
53 if (fd >= 0)
54 return fd;
55 xfunc_die(); /* We already output an error message. */
56}