commit: a6b1c33ad00c231fa41fbae9fe5e830cd4e5c841
parent 1713d5da0213c18a0da4bea461274864ea87006a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 6 Oct 2024 09:32:08 +0200
cmd/chmod: Fix error messages not containing "error:"
Diffstat:
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/cmd/chmod.c b/cmd/chmod.c
@@ -146,12 +146,13 @@ do_fchmodat(int fd, char *mode_arg, char *name, char *acc_path, bool recursive)
char new_path[PATH_MAX] = "";
if(snprintf(new_path, PATH_MAX, "%s/%s", acc_path, dp->d_name) < 0)
{
- fprintf(stderr,
- "%s: Couldn't concatenate '%s' into parent '%s', skipping to next entry: %s\n",
- argv0,
- name,
- acc_path,
- strerror(errno));
+ fprintf(
+ stderr,
+ "%s: error: Couldn't concatenate '%s' into parent '%s', skipping to next entry: %s\n",
+ argv0,
+ name,
+ acc_path,
+ strerror(errno));
err++;
errno = 0;
continue;
@@ -167,7 +168,7 @@ do_fchmodat(int fd, char *mode_arg, char *name, char *acc_path, bool recursive)
if(closedir(dirp) != 0)
{
fprintf(stderr,
- "%s: Deallocating directory entry for '%s' failed: %s\n",
+ "%s: error: Deallocating directory entry for '%s' failed: %s\n",
argv0,
acc_path,
strerror(errno));