|
|
ca6c51 |
From: Pavel Raiskup <praiskup@redhat.com>
|
|
|
ca6c51 |
Date: Mon, 14 Sep 2015 09:27:21 +0200
|
|
|
ca6c51 |
Subject: [PATCH 1/7] make '-c' equivalent to '-H newc'
|
|
|
ca6c51 |
|
|
|
ca6c51 |
diff --git a/doc/cpio.texi b/doc/cpio.texi
|
|
|
ca6c51 |
index e631934..a788b5d 100644
|
|
|
ca6c51 |
--- a/doc/cpio.texi
|
|
|
ca6c51 |
+++ b/doc/cpio.texi
|
|
|
ca6c51 |
@@ -261,7 +261,8 @@ Sets the I/O block size to @var{block-size} * 512 bytes.
|
|
|
ca6c51 |
@item -B
|
|
|
ca6c51 |
Set the I/O block size to 5120 bytes.
|
|
|
ca6c51 |
@item -c
|
|
|
ca6c51 |
-Use the old portable (ASCII) archive format.
|
|
|
ca6c51 |
+Identical to "-H newc", use the new (SVR4) portable format. If you wish the old
|
|
|
ca6c51 |
+portable (ASCII) archive format, use "-H odc" instead.
|
|
|
ca6c51 |
@item -C @var{number}
|
|
|
ca6c51 |
@itemx --io-size=@var{number}
|
|
|
ca6c51 |
Set the I/O block size to the given @var{number} of bytes.
|
|
|
ca6c51 |
@@ -343,7 +344,8 @@ Equivalent to @option{-sS}.
|
|
|
ca6c51 |
@item -B
|
|
|
ca6c51 |
Set the I/O block size to 5120 bytes.
|
|
|
ca6c51 |
@item -c
|
|
|
ca6c51 |
-Use the old portable (ASCII) archive format.
|
|
|
ca6c51 |
+Identical to "-H newc", use the new (SVR4) portable format. If you wish the old
|
|
|
ca6c51 |
+portable (ASCII) archive format, use "-H odc" instead.
|
|
|
ca6c51 |
@item -C @var{number}
|
|
|
ca6c51 |
@itemx --io-size=@var{number}
|
|
|
ca6c51 |
Set the I/O block size to the given @var{number} of bytes.
|
|
|
ca6c51 |
@@ -454,7 +456,8 @@ Sets the I/O block size to @var{block-size} * 512 bytes.
|
|
|
ca6c51 |
@item -B
|
|
|
ca6c51 |
Set the I/O block size to 5120 bytes.
|
|
|
ca6c51 |
@item -c
|
|
|
ca6c51 |
-Use the old portable (ASCII) archive format.
|
|
|
ca6c51 |
+Identical to "-H newc", use the new (SVR4) portable format. If you wish the old
|
|
|
ca6c51 |
+portable (ASCII) archive format, use "-H odc" instead.
|
|
|
ca6c51 |
@item -C @var{number}
|
|
|
ca6c51 |
@itemx --io-size=@var{number}
|
|
|
ca6c51 |
Set the I/O block size to the given @var{number} of bytes.
|
|
|
ca6c51 |
@@ -600,7 +603,8 @@ block size is 512 bytes.
|
|
|
ca6c51 |
|
|
|
ca6c51 |
@item -c
|
|
|
ca6c51 |
[@ref{copy-in},@ref{copy-out},@ref{copy-pass}]
|
|
|
ca6c51 |
-@*Use the old portable (ASCII) archive format.
|
|
|
ca6c51 |
+@*Identical to "-H newc", use the new (SVR4) portable format. If you wish the
|
|
|
ca6c51 |
+old portable (ASCII) archive format, use "-H odc" instead.
|
|
|
ca6c51 |
|
|
|
ca6c51 |
@item -C @var{io-size}
|
|
|
ca6c51 |
@itemx --io-size=@var{io-size}
|
|
|
ca6c51 |
diff --git a/src/main.c b/src/main.c
|
|
|
ca6c51 |
index a13861f..a875a13 100644
|
|
|
ca6c51 |
--- a/src/main.c
|
|
|
ca6c51 |
+++ b/src/main.c
|
|
|
ca6c51 |
@@ -124,7 +124,7 @@ static struct argp_option options[] = {
|
|
|
ca6c51 |
{"block-size", BLOCK_SIZE_OPTION, N_("BLOCK-SIZE"), 0,
|
|
|
ca6c51 |
N_("Set the I/O block size to BLOCK-SIZE * 512 bytes"), GRID+1 },
|
|
|
ca6c51 |
{NULL, 'c', NULL, 0,
|
|
|
ca6c51 |
- N_("Use the old portable (ASCII) archive format"), GRID+1 },
|
|
|
ca6c51 |
+ N_("Identical to \"-H newc\", use the new (SVR4) portable format. If you wish the old portable (ASCII) archive format, use \"-H odc\" instead."), GRID+1 },
|
|
|
ca6c51 |
{"dot", 'V', NULL, 0,
|
|
|
ca6c51 |
N_("Print a \".\" for each file processed"), GRID+1 },
|
|
|
ca6c51 |
{"io-size", 'C', N_("NUMBER"), 0,
|
|
|
ca6c51 |
@@ -329,6 +329,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
|
|
|
ca6c51 |
case 'c': /* Use the old portable ASCII format. */
|
|
|
ca6c51 |
if (archive_format != arf_unknown)
|
|
|
ca6c51 |
USAGE_ERROR ((0, 0, _("Archive format multiply defined")));
|
|
|
ca6c51 |
+#define SVR4_COMPAT
|
|
|
ca6c51 |
#ifdef SVR4_COMPAT
|
|
|
ca6c51 |
archive_format = arf_newascii; /* -H newc. */
|
|
|
ca6c51 |
#else
|