lineedit: do not hang on error, but return error indicator.
[oweals/busybox.git] / libbb / dump.c
index 7a87219ba7978b349953b550364d04832bd46f02..4db3f06f0935f99e277ee3b5f5fdada67c9bd97f 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright (c) 1989
  *     The Regents of the University of California.  All rights reserved.
  *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  *
  * Original copyright notice is retained at the end of this file.
  */
@@ -323,9 +323,7 @@ static void do_skip(priv_dumper_t *dumper, const char *fname, int statok)
        struct stat sbuf;
 
        if (statok) {
-               if (fstat(STDIN_FILENO, &sbuf)) {
-                       bb_simple_perror_msg_and_die(fname);
-               }
+               xfstat(STDIN_FILENO, &sbuf, fname);
                if (!(S_ISCHR(sbuf.st_mode) || S_ISBLK(sbuf.st_mode) || S_ISFIFO(sbuf.st_mode))
                 && dumper->pub.dump_skip >= sbuf.st_size
                ) {