diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-10-28 13:02:31 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-11-04 02:03:41 +0000 |
commit | ab40a941a07d80326aaa051e3c94c88b800cbd7d (patch) | |
tree | 382e656f126d0e63ca1158f8f43630e1dd10d18b /src/du.c | |
parent | 00eb7af8ea30ccbefeb17213cd644b8f0ade1ef8 (diff) | |
download | coreutils-ab40a941a07d80326aaa051e3c94c88b800cbd7d.tar.xz |
all: replace most uses of quotearg_colon() with quote()
Related to commit v8.24-61-g6796698 this provides
more consistent quoting, as quotearg_colon() defaults
to "literal" quoting by default, while quote()
provides appropriate quoting for diagnostics by default.
* gl/modules/randread: Depend on quote module rather than quotearg.
* gl/lib/randread.c: Used quote() not quotearg_colon().
* src/: Likewise.
* src/shred.c: Likewise. Also avoid unnecessary quoting
introducing overhead when wiping names.
* cfg.mk: Relax the matching expression to allow
"qname" variables as used in shred.c to satisfy the check.
* tests/: Adjust accordingly.
Diffstat (limited to 'src/du.c')
-rw-r--r-- | src/du.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -37,7 +37,6 @@ #include "human.h" #include "mountlist.h" #include "quote.h" -#include "quotearg.h" #include "stat-size.h" #include "stat-time.h" #include "stdio--.h" @@ -692,7 +691,7 @@ du_files (char **files, int bit_flags) if (errno != 0) { error (0, errno, _("fts_read failed: %s"), - quotearg_colon (fts->fts_path)); + quote (fts->fts_path)); ok = false; } @@ -883,7 +882,7 @@ main (int argc, char **argv) if (add_exclude_file (add_exclude, exclude, optarg, EXCLUDE_WILDCARDS, '\n')) { - error (0, errno, "%s", quotearg_colon (optarg)); + error (0, errno, "%s", quote (optarg)); ok = false; } break; @@ -1069,7 +1068,7 @@ main (int argc, char **argv) goto argv_iter_done; case AI_ERR_READ: error (0, errno, _("%s: read error"), - quotearg_colon (files_from)); + quote (files_from)); ok = false; goto argv_iter_done; case AI_ERR_MEM: @@ -1106,7 +1105,7 @@ main (int argc, char **argv) not totally appropriate, since NUL is the separator, not NL, but it might be better than nothing. */ unsigned long int file_number = argv_iter_n_args (ai); - error (0, 0, "%s:%lu: %s", quotearg_colon (files_from), + error (0, 0, "%s:%lu: %s", quote (files_from), file_number, _("invalid zero-length file name")); } skip_file = true; |