]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(recheck): Don't refuse to tail a non-regular, non-pipe.
authorJim Meyering <jim@meyering.net>
Wed, 3 Nov 1999 12:13:39 +0000 (12:13 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 3 Nov 1999 12:13:39 +0000 (12:13 +0000)
(tail_file): Likewise.

src/tail.c

index 40ce9f02aac1b7c6e75bc9dbf8391af9f498cb26..c2a3ca4bb7684f6b02bb6842ed33b60271239b14 100644 (file)
@@ -736,16 +736,6 @@ recheck (struct File_spec *f)
          error (0, errno, "%s", pretty_name (f));
        }
     }
-  else if (!S_ISREG (new_stats.st_mode)
-          && !S_ISFIFO (new_stats.st_mode))
-    {
-      fail = 1;
-      f->errnum = -1;
-      error (0, 0,
-            _("`%s' has been replaced with a non-regular file;  \
-cannot follow end of non-regular file"),
-            pretty_name (f));
-    }
   else
     {
       f->errnum = 0;
@@ -1121,13 +1111,7 @@ tail_file (struct File_spec *f, off_t n_units)
              errors = 1;
              f->errnum = errno;
            }
-         else if (!S_ISREG (stats.st_mode) && !S_ISFIFO (stats.st_mode))
-           {
-             error (0, 0, _("%s: cannot follow end of non-regular file"),
-                    pretty_name (f));
-             errors = 1;
-             f->errnum = -1;
-           }
+
          if (errors)
            {
              close_fd (fd, pretty_name (f));