From f2606d0875dbaadb3f414d98d8f37fdbdf6036ea Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Wed, 3 May 2023 12:17:56 -0400 Subject: add rm, cp, mkdir, mv --- src/commands/groups.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/commands/groups.c') diff --git a/src/commands/groups.c b/src/commands/groups.c index aea92af..763f294 100644 --- a/src/commands/groups.c +++ b/src/commands/groups.c @@ -9,7 +9,7 @@ COMMAND_EMPTY(groups) { struct passwd* pw = getpwuid(uid); if(pw == NULL){ - perror("error: failed to fetch groups: "); + error("failed to fetch groups: %s", strerror(errno)); } int ngroups = 0; @@ -21,7 +21,7 @@ COMMAND_EMPTY(groups) { for (int i = 0; i < ngroups; i++){ struct group* gr = getgrgid(groups[i]); if(gr == NULL){ - perror("error: failed to fetch groups: "); + error("failed to fetch groups: %s", strerror(errno)); } printf("%s ",gr->gr_name); } -- cgit v1.2.3-freya