From: Tim Kientzle Date: Sun, 6 Dec 2009 23:41:11 +0000 (-0500) Subject: Explain the index number validation here. X-Git-Tag: v2.8.0~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5236575a9c325316862ab59dfcc8bf1a07d94f6;p=thirdparty%2Flibarchive.git Explain the index number validation here. SVN-Revision: 1712 --- diff --git a/libarchive/test/test_write_format_cpio_odc.c b/libarchive/test/test_write_format_cpio_odc.c index c06634da8..af9ce1981 100644 --- a/libarchive/test/test_write_format_cpio_odc.c +++ b/libarchive/test/test_write_format_cpio_odc.c @@ -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;