Userland: Include hard link count in "ls -l" output

This commit is contained in:
Nico Weber 2021-01-06 10:29:33 -05:00 committed by Andreas Kling
parent ddc255a6c0
commit 8079d566f1
Notes: sideshowbarker 2024-07-19 00:04:01 +09:00

View file

@ -288,6 +288,8 @@ static bool print_filesystem_object(const String& path, const String& name, cons
else
printf("%c", st.st_mode & S_IXOTH ? 'x' : '-');
printf(" %u", st.st_nlink);
auto username = users.get(st.st_uid);
if (!flag_print_numeric && username.has_value()) {
printf(" %7s", username.value().characters());