diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-01-27 07:23:15 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2005-01-27 07:23:15 +0000 |
commit | 2adb7a4f790b451bf3ab0efea4341aeab62f81c1 (patch) | |
tree | 3e2d05a89f18db8acd8b3148e457925b6baa55d0 /lib/backup-files.c | |
parent | f627ef19e6f521a73bc71af9c292d0a16c32d3a9 (diff) | |
download | quilt-2adb7a4f790b451bf3ab0efea4341aeab62f81c1.tar.gz |
- lib/backup-files.c: Remove unused command line option and
document the remaining options.
- quilt/pop.in: Colorize this as well:
"Patch attempted to create file *, which already exists."
"can't find file to patch at input line *"
"* out of * hunk ignored"
Diffstat (limited to 'lib/backup-files.c')
-rw-r--r-- | lib/backup-files.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/backup-files.c b/lib/backup-files.c index 03628d4..9e6392c 100644 --- a/lib/backup-files.c +++ b/lib/backup-files.c @@ -44,7 +44,7 @@ const char *progname; enum { what_noop, what_backup, what_restore, what_remove }; const char *opt_prefix="", *opt_suffix="", *opt_file; -int opt_silent, opt_what=what_noop, opt_ignore_missing; +int opt_silent, opt_what=what_noop; int opt_nolinks, opt_touch; #define LINE_LENGTH 1024 @@ -53,7 +53,7 @@ int opt_nolinks, opt_touch; void usage(void) { - printf("Usage: %s [-B prefix] [-z suffix] [-f {filelist|-}] [-s] [-b|-r|-x] [-L] {filename|-} ...\n" + printf("Usage: %s [-B prefix] [-z suffix] [-f {file|-}] [-s] [-b|-r|-x] [-L] {file|-} ...\n" "\n" "\tCreate hard linked backup copies of a list of files\n" "\tread from standard input.\n" @@ -64,6 +64,10 @@ usage(void) "\t-B\tPath name prefix for backup files\n" "\t-z\tPath name suffix for backup files\n" "\t-s\tSilent operation; only print error messages\n" + "\t-L\tEnsure that when finished, the source file has a link count of 1\n" + "\t-f\tRead the filenames to process from file (- = standard input)\n" +i "\t-t\tTouch original files after restore (update their mtimes)\n\n" + "\t-L\tEnsure that when finished, the source file has a link count of 1\n\n", progname); } @@ -256,8 +260,6 @@ process_file(const char *file) create_parents(file); if (stat(backup, &st) != 0) { - if (opt_ignore_missing && errno == ENOENT) - return 0; perror(backup); return 1; } @@ -340,7 +342,7 @@ main(int argc, char *argv[]) progname = argv[0]; - while ((opt = getopt(argc, argv, "brxB:z:f:shFLt")) != -1) { + while ((opt = getopt(argc, argv, "brxB:z:f:shLt")) != -1) { switch(opt) { case 'b': opt_what = what_backup; @@ -362,10 +364,6 @@ main(int argc, char *argv[]) opt_file = optarg; break; - case 'F': /* ignore missing input files */ - opt_ignore_missing = 1; - break; - case 'z': opt_suffix = optarg; break; |