Skip to content

Commit 6df1f80

Browse files
author
Connor-GH
committed
ls: remove unnecessary getgrgid handling for Redox OS
Redox OS now has getgrgid as seen in https://gitlab.redox-os.org/redox-os/relibc/-/blob/master/src/header/grp/mod.rs?ref_type=0636af21a468f04971bad11eb4571bcb94fdfa81#L253, so we can remove this special handling. This allows the group name to show up on Redox OS, instead of just the group id.
1 parent 9351b40 commit 6df1f80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/uu/ls/src/ls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2969,7 +2969,7 @@ fn display_uname<'a>(metadata: &Metadata, config: &Config, state: &'a mut ListSt
29692969
fn display_group<'a>(metadata: &Metadata, config: &Config, state: &'a mut ListState) -> &'a String {
29702970
let gid = metadata.gid();
29712971
state.gid_cache.entry(gid).or_insert_with(|| {
2972-
if cfg!(target_os = "redox") || config.long.numeric_uid_gid {
2972+
if config.long.numeric_uid_gid {
29732973
gid.to_string()
29742974
} else {
29752975
entries::gid2grp(gid).unwrap_or_else(|_| gid.to_string())

0 commit comments

Comments
 (0)