Bug 10581 - cpio -c is not in sync with the man page
Summary: cpio -c is not in sync with the man page
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: cpio
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: bero
QA Contact:
URL:
Whiteboard:
: 13806 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-04-04 15:19 UTC by giulioo
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-07-12 20:14:33 UTC
Embargoed:


Attachments (Terms of Use)

Description giulioo 2000-04-04 15:19:07 UTC
The man page of cpio says:
...
  -c     Use the old portable (ASCII) archive format.
...

But you included a patch:
cpio-2.4.2-svr4compat.patch
that makes cpio behave differently:

    case 'c':       /* Use the old portable ASCII format.  */
      if (archive_format != arf_unknown)
        usage (stderr, 2);
#define SVR4_COMPAT               <===================
#ifdef SVR4_COMPAT
      archive_format = arf_newascii; /* -H newc.  */
#else
      archive_format = arf_oldascii; /* -H odc.  */
#endif
      break;

This way -c means the new ascii format.

So, archives made with the unpatched cpio (other unix systems, old linux
distros) cannot be read with the rh6.x cpio using just "-c".

For instance:
find path|cpio -ocB > /dev/st0  (done on other systems)
Cannot be read/recovered with
cpio -icBdum < /dev/st0
While it's ok if the backup is done on rh6.x itself.

I think you should at least update the man page to reflect the different
behavior.

Comment 1 Jeff Johnson 2000-07-12 20:14:32 UTC
*** Bug 13806 has been marked as a duplicate of this bug. ***

Comment 2 Jeff Johnson 2000-08-08 16:16:12 UTC
Man page corrected in cpio-2.4.2-20.


Note You need to log in before you can comment on or make changes to this bug.