]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(tail_file): Set errnum to -1 if the initial "tail" failed.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 4 Dec 2004 07:02:35 +0000 (07:02 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 4 Dec 2004 07:02:35 +0000 (07:02 +0000)
src/tail.c

index fba74ecc3cde516ae2da37e236a6d586e7bad9cc..f09fbd6173141eb42ecf5a74ff4f3dcc07fa4b47 100644 (file)
@@ -1317,7 +1317,7 @@ tail_file (struct File_spec *f, uintmax_t n_units)
             call made the window big enough to exercise the problem.  */
          sleep (1);
 #endif
-         f->errnum = 0;
+         f->errnum = ok - 1;
          if (fstat (fd, &stats) < 0)
            {
              ok = false;