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