summaryrefslogtreecommitdiff
path: root/src/install.c
diff options
context:
space:
mode:
authorBenno Schulenberg <bensberg@justemail.net>2013-01-04 22:45:34 +0100
committerPádraig Brady <P@draigBrady.com>2013-02-06 15:57:34 +0000
commita1ee5cd714c0825b0244d09bbaa0a61c883ac18f (patch)
treeb5b0308b264b9be73dbeb1723bef30b00ab69545 /src/install.c
parent6a404ec16555bc0757ff06d99af96c12bfbc235e (diff)
downloadcoreutils-a1ee5cd714c0825b0244d09bbaa0a61c883ac18f.tar.xz
maint: improve error messages upon failed read, write, access, close
Note we use "failed to {access,close}" for those single operations, and "error {read,writ}ing" for those partial operation failures. * src/copy.c: Improve error messages for failing read, write and close. * src/cp.c: Improve error messages for failing access. * src/dd.c: Improve error messages for failing read, write and open. * src/head.c: Improve error message for failing close. * src/install.c: Improve error messages for failing access. * src/ln.c: Likewise. * src/mv.c: Likewise. * src/touch.c: Improve error message for failing close. * src/truncate.c: Likewise.
Diffstat (limited to 'src/install.c')
-rw-r--r--src/install.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/install.c b/src/install.c
index 55333c257..94374df3e 100644
--- a/src/install.c
+++ b/src/install.c
@@ -399,7 +399,7 @@ target_directory_operand (char const *file)
int err = (stat (file, &st) == 0 ? 0 : errno);
bool is_a_dir = !err && S_ISDIR (st.st_mode);
if (err && err != ENOENT)
- error (EXIT_FAILURE, err, _("accessing %s"), quote (file));
+ error (EXIT_FAILURE, err, _("failed to access %s"), quote (file));
if (is_a_dir < looks_like_a_dir)
error (EXIT_FAILURE, err, _("target %s is not a directory"), quote (file));
return is_a_dir;
@@ -841,7 +841,8 @@ main (int argc, char **argv)
{
struct stat st;
if (stat (optarg, &st) != 0)
- error (EXIT_FAILURE, errno, _("accessing %s"), quote (optarg));
+ error (EXIT_FAILURE, errno, _("failed to access %s"),
+ quote (optarg));
if (! S_ISDIR (st.st_mode))
error (EXIT_FAILURE, 0, _("target %s is not a directory"),
quote (optarg));