diff options
author | Tom Ivar Helbekkmo <tih@hamartun.priv.no> | 2021-03-06 13:04:37 +0100 |
---|---|---|
committer | Tom Ivar Helbekkmo <tih@hamartun.priv.no> | 2021-03-06 13:04:37 +0100 |
commit | 5ec9c3533ebd4ed0cabdf2a509d9dba32f4c5f1e (patch) | |
tree | e0bc2e5bd22f7491705e79a2559c18e29f9afb3a /cpio | |
parent | 809c2e466faa4ec6e60c6bf3f9b2a95dd2f6e4fc (diff) | |
download | libarchive-5ec9c3533ebd4ed0cabdf2a509d9dba32f4c5f1e.tar.gz |
update cpio documentation, add basic test of binary format
Diffstat (limited to 'cpio')
-rw-r--r-- | cpio/bsdcpio.1 | 7 | ||||
-rw-r--r-- | cpio/test/test_basic.c | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/cpio/bsdcpio.1 b/cpio/bsdcpio.1 index 514c1a2c..01b508e1 100644 --- a/cpio/bsdcpio.1 +++ b/cpio/bsdcpio.1 @@ -82,6 +82,13 @@ all operating modes. .It Fl 0 , Fl Fl null Read filenames separated by NUL characters instead of newlines. This is necessary if any of the filenames being read might contain newlines. +.It Fl 6 , Fl Fl pwb +When reading a binary format archive, assume it's the earlier one, +from the PWB variant of 6th Edition UNIX. +When writing a cpio archive, use the PWB format. +.It Fl 7 , Fl Fl binary +(o mode only) +When writing a cpio archive, use the (newer, non-PWB) binary format. .It Fl A (o mode only) Append to the specified archive. diff --git a/cpio/test/test_basic.c b/cpio/test/test_basic.c index b7162534..3d7d86a0 100644 --- a/cpio/test/test_basic.c +++ b/cpio/test/test_basic.c @@ -230,6 +230,8 @@ DEFINE_TEST(test_basic) basic_cpio("copy_odc", "--format=odc", "", msg, msg); basic_cpio("copy_newc", "-H newc", "", result, "2 blocks\n"); basic_cpio("copy_cpio", "-H odc", "", msg, msg); + msg = "1 block\n"; + basic_cpio("copy_bin", "-H bin", "", msg, msg); msg = canSymlink() ? "9 blocks\n" : "8 blocks\n"; basic_cpio("copy_ustar", "-H ustar", "", msg, msg); |