diff options
author | Denys Vlasenko | 2010-08-22 05:39:15 +0200 |
---|---|---|
committer | Denys Vlasenko | 2010-08-22 05:39:15 +0200 |
commit | e7b0a9e5bc60617fb00c321430253d7771d40fd3 (patch) | |
tree | 5152c7e606fb72423de8d56c5c97a977c6852033 /libbb/wfopen_input.c | |
parent | fd27fa83094a85b3e8cb0485467ffa65b572b923 (diff) | |
download | busybox-e7b0a9e5bc60617fb00c321430253d7771d40fd3.zip busybox-e7b0a9e5bc60617fb00c321430253d7771d40fd3.tar.gz |
patch: support "patch [FILE [PATCH]]" format
function old new delta
xopen_stdin - 15 +15
patch_main 2075 2041 -34
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/wfopen_input.c')
-rw-r--r-- | libbb/wfopen_input.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libbb/wfopen_input.c b/libbb/wfopen_input.c index 7263c93..422a58e 100644 --- a/libbb/wfopen_input.c +++ b/libbb/wfopen_input.c @@ -46,3 +46,11 @@ int FAST_FUNC open_or_warn_stdin(const char *filename) return fd; } + +int FAST_FUNC xopen_stdin(const char *filename) +{ + int fd = open_or_warn_stdin(filename); + if (fd >= 0) + return fd; + xfunc_die(); /* We already output an error message. */ +} |