diff options
author | Jim Meyering <meyering@redhat.com> | 2011-10-18 14:20:36 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-10-19 09:31:52 +0200 |
commit | e6fb579f4131506c14195788c6a5ae980ca7b05d (patch) | |
tree | 0ccf4465f25ddb24f2b07a3cacb6bcf75e88202d | |
parent | 1bb97e2aa16a247304c2492f6b52f2106259dbf4 (diff) | |
download | coreutils-e6fb579f4131506c14195788c6a5ae980ca7b05d.tar.xz |
maint: tac: prefer "failed to" diagnostic over "cannot"
* src/tac.c: Change wording in diagnostic: "failed to open" seems
clearer than "cannot open".
-rw-r--r-- | src/tac.c | 8 | ||||
-rwxr-xr-x | tests/misc/tac | 2 |
2 files changed, 6 insertions, 4 deletions
@@ -449,7 +449,7 @@ temp_stream (FILE **fp, char **file_name) int fd = mkstemp (tempfile); if (fd < 0) { - error (0, errno, _("cannot create temporary file in %s"), + error (0, errno, _("failed to create temporary file in %s"), quote (tempdir)); goto Reset; } @@ -457,7 +457,8 @@ temp_stream (FILE **fp, char **file_name) tmp_fp = fdopen (fd, (O_BINARY ? "w+b" : "w+")); if (! tmp_fp) { - error (0, errno, _("cannot open %s for writing"), quote (tempfile)); + error (0, errno, _("failed to open %s for writing"), + quote (tempfile)); close (fd); unlink (tempfile); Reset: @@ -569,7 +570,8 @@ tac_file (const char *filename) fd = open (filename, O_RDONLY | O_BINARY); if (fd < 0) { - error (0, errno, _("cannot open %s for reading"), quote (filename)); + error (0, errno, _("failed to open %s for reading"), + quote (filename)); return false; } } diff --git a/tests/misc/tac b/tests/misc/tac index 7bd07bd8a..56021280b 100755 --- a/tests/misc/tac +++ b/tests/misc/tac @@ -68,7 +68,7 @@ my @Tests = {ENV => "TMPDIR=$bad_dir"}, {IN_PIPE => "a\n"}, {ERR_SUBST => "s,`$bad_dir': .*,...,"}, - {ERR => "$prog: cannot create temporary file in ...\n"}, + {ERR => "$prog: failed to create temporary file in ...\n"}, {EXIT => 1}], # coreutils-8.5's tac would double-free its primary buffer. |