]> Dogcows Code - chaz/tar/blobdiff - src/buffer.c
Sync with fileutils
[chaz/tar] / src / buffer.c
index d29ccccef279350575905ec718a9326e32888264..1d164b4bde00fbba9a3b464cc1f1fdf0ee2966e1 100644 (file)
@@ -301,7 +301,9 @@ write_archive_buffer (void)
     {
       written += status;
       if (written == record_size
-         || _isrmt (archive) || ! S_ISFIFO (archive_stat.st_mode))
+         || _isrmt (archive)
+         || ! (S_ISFIFO (archive_stat.st_mode)
+               || S_ISSOCK (archive_stat.st_mode)))
        break;
     }
 
@@ -1208,12 +1210,7 @@ flush_read (void)
          archive_read_error ();
 
       if (status == 0)
-       {
-         if (left % BLOCKSIZE != 0)
-           ERROR ((0, 0, _("%d garbage bytes ignored at end of archive"),
-                   (int) ((record_size - left) % BLOCKSIZE)));
-         break;
-       }
+       break;
 
       if (! read_full_records_option)
        FATAL_ERROR ((0, 0, _("Unaligned block (%lu bytes) in archive"),
@@ -1335,7 +1332,7 @@ close_archive (void)
 
   if (access_mode == ACCESS_READ
       && ! _isrmt (archive)
-      && S_ISFIFO (archive_stat.st_mode))
+      && (S_ISFIFO (archive_stat.st_mode) || S_ISSOCK (archive_stat.st_mode)))
     while (rmtread (archive, record_start->buffer, record_size) > 0)
       continue;
 #endif
This page took 0.023392 seconds and 4 git commands to generate.