1 /* vi: set sw=4 ts=4: */
3 * Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org>
5 * Licensed under GPLv2, see file LICENSE in this source tree.
7 //kbuild:lib-y += bb_cat.o
11 int FAST_FUNC bb_cat(char **argv)
14 int retval = EXIT_SUCCESS;
17 argv = (char**) &bb_argv_dash;
20 fd = open_or_warn_stdin(*argv);
22 /* This is not a xfunc - never exits */
23 off_t r = bb_copyfd_eof(fd, STDOUT_FILENO);
24 if (fd != STDIN_FILENO)
29 retval = EXIT_FAILURE;