cvs commit: src/lib/libarchive archive_write_set_format_pax.c archive_write_set_format_shar.c archive_write_set_format_ustar.c

Tim Kientzle kientzle at FreeBSD.org
Fri Mar 5 21:44:13 PST 2004


kientzle    2004/03/05 21:44:13 PST

  FreeBSD src repository

  Modified files:
    lib/libarchive       archive_write_set_format_pax.c 
                         archive_write_set_format_shar.c 
                         archive_write_set_format_ustar.c 
  Log:
  Minor API tweak: The format-specific write_header function now sets
  the size in the archive_entry object to zero if that format doesn't
  store a body for that file type.  This allows the client to determine
  whether or not it should feed the file body to the archive.  In
  particular, cpio stores the file body for hardlinks, tar and shar
  don't.  With this change, bsdtar now correctly archives hardlinks in all
  supported formats.
  
  While I'm here, make shar output be more aggressive about creating directories.
  Before this, commands such as:
      bsdtar -cv -F shar  some/explicit/path/to/a/file
  wouldn't create the directory.  Some simple logic to remember the last
  directory creation helps reduce unnecessary mkdirs here.
  
  At this point, I think the only flaw in libarchive's cpio support is
  the failure to recognize hardlinks when reading.
  
  Revision  Changes    Path
  1.2       +32 -7     src/lib/libarchive/archive_write_set_format_pax.c
  1.2       +70 -21    src/lib/libarchive/archive_write_set_format_shar.c
  1.2       +8 -8      src/lib/libarchive/archive_write_set_format_ustar.c


More information about the cvs-src mailing list