From e735ad6710a82604a206ad29f6cbcdd7dc4b024c Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Sun, 14 May 2023 21:43:02 -0400 Subject: refactor and add su --- command/chown.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'command/chown.c') diff --git a/command/chown.c b/command/chown.c index 164e3b4..dcb6941 100644 --- a/command/chown.c +++ b/command/chown.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -60,7 +59,7 @@ static void chown_file(char* path) { if (chown(get_path_buffer(), flags.uid, flags.gid) < 0) { if (!flags.quiet) { - error_s("cannot chown '%s': %s", get_path_buffer(), strerror(errno)); + error_s("cannot chown '%s'", get_path_buffer()); } pop_path_buffer(save); return; @@ -75,7 +74,7 @@ static void chown_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 +88,7 @@ static void chown_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; -- cgit v1.2.3-freya