瀏覽代碼

Omit devmajor and devminor for non-special files

* src/create.c (start_header): Leave the devmajor and devminor
fields empty for files that are not character and block special
devices, even when the archive format is pax, ustar or v7.
This avoids generating irrelevant differences which helps with
reproducible builds, and is more compatible with what Solaris 10
tar does.
Paul Eggert 3 年之前
父節點
當前提交
738de9ecde
共有 1 個文件被更改,包括 0 次插入6 次删除
  1. 0 6
      src/create.c

+ 0 - 6
src/create.c

@@ -881,12 +881,6 @@ start_header (struct tar_stat_info *st)
       if (!MINOR_TO_CHARS (devminor, header->header.devminor))
 	return NULL;
     }
-  else if (archive_format != GNU_FORMAT && archive_format != OLDGNU_FORMAT)
-    {
-      if (!(MAJOR_TO_CHARS (0, header->header.devmajor)
-	    && MINOR_TO_CHARS (0, header->header.devminor)))
-	return NULL;
-    }
 
   if (archive_format == POSIX_FORMAT)
     {