]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Explain the index number validation here.
authorTim Kientzle <kientzle@gmail.com>
Sun, 6 Dec 2009 23:41:11 +0000 (18:41 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sun, 6 Dec 2009 23:41:11 +0000 (18:41 -0500)
SVN-Revision: 1712

libarchive/test/test_write_format_cpio_odc.c

index c06634da8845901766add4020de435f67e9d525f..af9ce1981ae48d55d3ae37648ab3182bb2dfa5b7 100644 (file)
@@ -131,6 +131,20 @@ DEFINE_TEST(test_write_format_cpio_odc)
 
        /*
         * Verify the archive format.
+        *
+        * Notes on the ino validation: cpio does not actually require
+        * that the ino values written to the archive match those read
+        * from disk.  It really requires that:
+        *   * matching non-zero ino values be written as matching
+        *     non-zero values
+        *   * non-matching non-zero ino values be written as non-matching
+        *     non-zero values
+        * Libarchive further ensures that zero ino values get written
+        * as zeroes.  This allows the cpio writer to generate
+        * synthetic ino values for the archive that may be different
+        * than those on disk in order to avoid problems due to truncation.
+        * This is especially needed for odc (POSIX format) that
+        * only supports 18-bit ino values.
         */
        e = buff;