OSDN Git Service

stat: fix group name
authorJosé Bollo <jose.bollo@open.eurogiciel.org>
Wed, 6 May 2015 12:57:51 +0000 (14:57 +0200)
committerRob Landley <rob@landley.net>
Fri, 15 May 2015 19:45:48 +0000 (14:45 -0500)
Change-Id: I0ad65a40bf380d789c4396ebdc01be217901a2e3

toys/other/stat.c

index a96c1de..d6db44d 100644 (file)
@@ -82,7 +82,7 @@ static void print_stat(char type)
     if (!stat->st_size && filetype == S_IFREG) t = "regular empty file";
     xprintf("%s", t);
   } else if (type == 'g') xprintf("%lu", stat->st_gid);
-  else if (type == 'G') xprintf("%8s", TT.user_name->pw_name);
+  else if (type == 'G') xprintf("%8s", TT.group_name->gr_name);
   else if (type == 'h') xprintf("%lu", stat->st_nlink);
   else if (type == 'i') xprintf("%llu", stat->st_ino);
   else if (type == 'N') {