aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2014-01-30 11:10:26 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2014-01-30 12:13:28 +0200
commita3987da2a573bd2438f15df6faa680922025be18 (patch)
treeccab2a2da1af43253e8027f89ea3703a3f3672bd /src
parent69014cd645779484724d579fc0d302bbaf146ff2 (diff)
downloadcpio-a3987da2a573bd2438f15df6faa680922025be18.tar.gz
cpio-a3987da2a573bd2438f15df6faa680922025be18.tar.bz2
Improve documentation.
* .gitignore: Update. * NEWS: Update. * doc/cpio.1: Rewrite. * doc/cpio.texi: Major revamp. * src/main.c (options): Fix sectioning of the help output. (parse_opt): * src/util.c: Use PAXEXIT_FAILURE to indicate an error.
Diffstat (limited to 'src')
-rw-r--r--src/main.c44
-rw-r--r--src/util.c4
2 files changed, 24 insertions, 24 deletions
diff --git a/src/main.c b/src/main.c
index 4c1c033..d352e25 100644
--- a/src/main.c
+++ b/src/main.c
@@ -106,8 +106,6 @@ static struct argp_option options[] = {
{NULL, 0, NULL, 0,
N_("Operation modifiers valid in any mode:"), GRID },
- {"file", 'F', N_("[[USER@]HOST:]FILE-NAME"), 0,
- N_("Use this FILE-NAME instead of standard input or output. Optional USER and HOST specify the user and host names in case of a remote archive"), GRID+1 },
{"directory", 'D', N_("DIR"), 0,
N_("Change to directory DIR"), GRID+1 },
@@ -125,16 +123,6 @@ static struct argp_option options[] = {
N_("Print a \".\" for each file processed"), GRID+1 },
{"io-size", 'C', N_("NUMBER"), 0,
N_("Set the I/O block size to the given NUMBER of bytes"), GRID+1 },
- {"message", 'M', N_("STRING"), 0,
- N_("Print STRING when the end of a volume of the backup media is reached"),
- GRID+1 },
- {"nonmatching", 'f', 0, 0,
- N_("Only copy files that do not match any of the given patterns"), GRID+1 },
- {"numeric-uid-gid", 'n', 0, 0,
- N_("In the verbose table of contents listing, show numeric UID and GID"),
- GRID+1 },
- {"rsh-command", RSH_COMMAND_OPTION, N_("COMMAND"), 0,
- N_("Use remote COMMAND instead of rsh"), GRID+1 },
{"quiet", QUIET_OPTION, NULL, 0,
N_("Do not print the number of blocks copied"), GRID+1 },
{"verbose", 'v', NULL, 0,
@@ -145,12 +133,31 @@ static struct argp_option options[] = {
#endif
{"warning", 'W', N_("FLAG"), 0,
N_("Control warning display. Currently FLAG is one of 'none', 'truncate', 'all'. Multiple options accumulate."), GRID+1 },
+ {"owner", 'R', N_("[USER][:.][GROUP]"), 0,
+ N_("Set the ownership of all files created to the specified USER and/or GROUP"), GRID+1 },
+#undef GRID
+
+#define GRID 110
+ {NULL, 0, NULL, 0,
+ N_("Operation modifiers valid in copy-in and copy-out modes"), GRID },
+ {"file", 'F', N_("[[USER@]HOST:]FILE-NAME"), 0,
+ N_("Use this FILE-NAME instead of standard input or output. Optional USER and HOST specify the user and host names in case of a remote archive"), GRID+1 },
+ {"message", 'M', N_("STRING"), 0,
+ N_("Print STRING when the end of a volume of the backup media is reached"),
+ GRID+1 },
+ {"rsh-command", RSH_COMMAND_OPTION, N_("COMMAND"), 0,
+ N_("Use COMMAND instead of rsh"), GRID+1 },
#undef GRID
/* ********** */
#define GRID 200
{NULL, 0, NULL, 0,
N_("Operation modifiers valid only in copy-in mode:"), GRID },
+ {"nonmatching", 'f', 0, 0,
+ N_("Only copy files that do not match any of the given patterns"), GRID+1 },
+ {"numeric-uid-gid", 'n', 0, 0,
+ N_("In the verbose table of contents listing, show numeric UID and GID"),
+ GRID+1 },
{"pattern-file", 'E', N_("FILE"), 0,
N_("Read additional patterns specifying filenames to extract or list from FILE"), 210},
{"only-verify-crc", ONLY_VERIFY_CRC_OPTION, 0, 0,
@@ -168,6 +175,8 @@ static struct argp_option options[] = {
GRID+1 },
{"to-stdout", TO_STDOUT_OPTION, NULL, 0,
N_("Extract files to standard output"), GRID+1 },
+ {NULL, 'I', N_("[[USER@]HOST:]FILE-NAME"), 0,
+ N_("Archive filename to use instead of standard input. Optional USER and HOST specify the user and host names in case of a remote archive"), GRID+1 },
#undef GRID
/* ********** */
@@ -204,13 +213,9 @@ static struct argp_option options[] = {
{NULL, 0, NULL, 0,
N_("Operation modifiers valid in copy-out and copy-pass modes:"), GRID },
{"null", '0', 0, 0,
- N_("A list of filenames is terminated by a null character instead of a newline"), GRID+1 },
- {NULL, 'I', N_("[[USER@]HOST:]FILE-NAME"), 0,
- N_("Archive filename to use instead of standard input. Optional USER and HOST specify the user and host names in case of a remote archive"), GRID+1 },
+ N_("Filenames in the list are delimited by null characters instead of newlines"), GRID+1 },
{"dereference", 'L', 0, 0,
N_("Dereference symbolic links (copy the files that they point to instead of copying the links)."), GRID+1 },
- {"owner", 'R', N_("[USER][:.][GROUP]"), 0,
- N_("Set the ownership of all files created to the specified USER and/or GROUP"), GRID+1 },
{"reset-access-time", 'a', NULL, 0,
N_("Reset the access times of files after reading them"), GRID+1 },
@@ -379,11 +384,6 @@ crc newc odc bin ustar tar (all-caps also recognized)"), arg);
input_archive_name = arg;
break;
- case 'k': /* Handle corrupted archives. We always handle
- corrupted archives, but recognize this
- option for compatability. */
- break;
-
case 'l': /* Link files when possible. */
link_flag = true;
break;
diff --git a/src/util.c b/src/util.c
index 22725e4..2fcab61 100644
--- a/src/util.c
+++ b/src/util.c
@@ -211,7 +211,7 @@ tape_fill_input_buffer (int in_des, int num_bytes)
if (input_size == 0)
{
error (0, 0, _("premature end of file"));
- exit (1);
+ exit (PAXEXIT_FAILURE);
}
input_bytes += input_size;
}
@@ -872,7 +872,7 @@ get_next_reel (int tape_des)
str_res = ds_fgets (tty_in, &new_name);
if (str_res == NULL || str_res[0] == '\0')
- exit (1);
+ exit (PAXEXIT_FAILURE);
next_archive_name = str_res;
tape_des = open_archive (next_archive_name);

Return to:

Send suggestions and report system problems to the System administrator.