diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-11-06 00:46:57 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-11-06 00:46:57 +0100 |
commit | 4909fec73eb3d4bbd2af17c2fb891b75291265e7 (patch) | |
tree | 59061ecb0fe61e8d68e4d39989847d937f38460c /coreutils | |
parent | 3bbfb58bec18990a2ee93f31ea1ee2fd19c4d9b2 (diff) | |
download | busybox-w32-4909fec73eb3d4bbd2af17c2fb891b75291265e7.tar.gz busybox-w32-4909fec73eb3d4bbd2af17c2fb891b75291265e7.tar.bz2 busybox-w32-4909fec73eb3d4bbd2af17c2fb891b75291265e7.zip |
ls: fix -lg to show group (was showing user)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/ls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index e69f1afd9..72f58c253 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -182,7 +182,7 @@ static const unsigned opt_flags[] = { | |||
182 | LIST_INO, /* i */ | 182 | LIST_INO, /* i */ |
183 | LIST_LONG | STYLE_LONG, /* l - remember LS_DISP_HR in mask! */ | 183 | LIST_LONG | STYLE_LONG, /* l - remember LS_DISP_HR in mask! */ |
184 | LIST_SHORT | STYLE_SINGLE, /* 1 */ | 184 | LIST_SHORT | STYLE_SINGLE, /* 1 */ |
185 | 0, /* g (don't show group) - handled via OPT_g */ | 185 | 0, /* g (don't show owner) - handled via OPT_g */ |
186 | LIST_ID_NUMERIC, /* n */ | 186 | LIST_ID_NUMERIC, /* n */ |
187 | LIST_BLOCKS, /* s */ | 187 | LIST_BLOCKS, /* s */ |
188 | DISP_ROWS, /* x */ | 188 | DISP_ROWS, /* x */ |
@@ -620,7 +620,7 @@ static NOINLINE unsigned list_single(const struct dnode *dn) | |||
620 | if (all_fmt & LIST_ID_NAME) { | 620 | if (all_fmt & LIST_ID_NAME) { |
621 | if (option_mask32 & OPT_g) { | 621 | if (option_mask32 & OPT_g) { |
622 | column += printf("%-8.8s ", | 622 | column += printf("%-8.8s ", |
623 | get_cached_username(dn->dstat.st_uid)); | 623 | get_cached_groupname(dn->dstat.st_gid)); |
624 | } else { | 624 | } else { |
625 | column += printf("%-8.8s %-8.8s ", | 625 | column += printf("%-8.8s %-8.8s ", |
626 | get_cached_username(dn->dstat.st_uid), | 626 | get_cached_username(dn->dstat.st_uid), |
@@ -630,7 +630,7 @@ static NOINLINE unsigned list_single(const struct dnode *dn) | |||
630 | #endif | 630 | #endif |
631 | if (all_fmt & LIST_ID_NUMERIC) { | 631 | if (all_fmt & LIST_ID_NUMERIC) { |
632 | if (option_mask32 & OPT_g) | 632 | if (option_mask32 & OPT_g) |
633 | column += printf("%-8u ", (int) dn->dstat.st_uid); | 633 | column += printf("%-8u ", (int) dn->dstat.st_gid); |
634 | else | 634 | else |
635 | column += printf("%-8u %-8u ", | 635 | column += printf("%-8u %-8u ", |
636 | (int) dn->dstat.st_uid, | 636 | (int) dn->dstat.st_uid, |