diff options
Diffstat (limited to '')
-rw-r--r-- | command/chmod.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/command/chmod.c b/command/chmod.c index 9e2972e..ef4ec3d 100644 --- a/command/chmod.c +++ b/command/chmod.c @@ -1,4 +1,3 @@ -#include "args.h" #include "command.h" #include "lslib.h" @@ -7,7 +6,6 @@ #include <pwd.h> #include <unistd.h> #include <dirent.h> -#include <errno.h> #include <string.h> enum method { @@ -27,7 +25,7 @@ static struct { static void help (void) { printf("Usage: chmod [-Rcvf] MODE[,MODE]... FILE...\n\n"); - printf("MODE is octal number (bit pattern sstrwxrwxrwx) or [ugoa]{+|-|=}[rwxXst]\n\n"); + printf("MODE is octal number (bit pattern sstrwxrwxrwx) or {+|-|=}[rwxXst]\n\n"); printf("\t-R\tRecurse\n"); printf("\t-c\tList changed files\n"); printf("\t-v\tVerbose\n"); @@ -73,7 +71,7 @@ static void chmod_file(char* path) { if (lstat(get_path_buffer(), &s) < 0) { if (!flags.quiet) { - error_s("cannot stat '%s': %s", get_path_buffer(), strerror(errno)); + error_s("cannot stat '%s'", get_path_buffer()); } pop_path_buffer(save); return; @@ -89,7 +87,7 @@ static void chmod_file(char* path) { if (chmod(get_path_buffer(), mode) < 0) { if (!flags.quiet) { - error_s("cannot chmod '%s': %s", get_path_buffer(), strerror(errno)); + error_s("cannot chmod '%s'", get_path_buffer()); } pop_path_buffer(save); return; @@ -110,7 +108,7 @@ static void chmod_file(char* path) { d = opendir(get_path_buffer()); if (d == NULL) { if (!flags.quiet) { - error_s("cannot open dir '%s': %s", get_path_buffer(), strerror(errno)); + error_s("cannot open dir '%s'", get_path_buffer()); } pop_path_buffer(save); return; |