NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/57891: stat(1) should interpret st_flags as it does with st_mode



>Number:         57891
>Category:       bin
>Synopsis:       stat(1) should interpret st_flags as it does with st_mode
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 29 21:40:00 +0000 2024
>Originator:     Ricardo Branco
>Release:        NetBSD 10.0_RC3
>Organization:
>Environment:
>Description:
The only output for st_flags in stat(1) is numeric.

This patch allows "-f %Sf" to display the file flags symbolically.

With this patch:

```
$ touch /tmp/abc
$ chflags uchg /tmp/abc
$ ./stat -f '%Sf %N' /tmp/abc
uchg /tmp/abc
```
>How-To-Repeat:

>Fix:
This is an adaptation of a fix I submitted years ago to FreeBSD:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=124349

Fix: https://github.com/NetBSD/src/pull/27



Home | Main Index | Thread Index | Old Index