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