mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
add mode chars
This commit is contained in:
parent
46199d113e
commit
8a75090664
2 changed files with 22 additions and 3 deletions
|
@ -111,13 +111,24 @@ interpreted
|
|||
as follows:
|
||||
the first character is
|
||||
.TP
|
||||
.B d
|
||||
.B d
|
||||
if the entry is a directory;
|
||||
.PD 0
|
||||
.TP
|
||||
.B a
|
||||
.B a
|
||||
if the entry is an append-only file;
|
||||
.TP
|
||||
.B D
|
||||
if the entry is a Unix device;
|
||||
.TP
|
||||
.B L
|
||||
if the entry is a symbolic link;
|
||||
.TP
|
||||
.B P
|
||||
if the entry is a named pipe;
|
||||
.TP
|
||||
.B S
|
||||
if the entry is a socket;
|
||||
.TP
|
||||
.B -
|
||||
if the entry is a plain file.
|
||||
.PD
|
||||
|
|
|
@ -33,6 +33,14 @@ dirmodefmt(Fmt *f)
|
|||
buf[0]='a';
|
||||
else if(m & DMAUTH)
|
||||
buf[0]='A';
|
||||
else if(m & DMDEVICE)
|
||||
buf[0] = 'D';
|
||||
else if(m & DMSYMLINK)
|
||||
buf[0] = 'L';
|
||||
else if(m & DMSOCKET)
|
||||
buf[0] = 'S';
|
||||
else if(m & DMNAMEDPIPE)
|
||||
buf[0] = 'P';
|
||||
else
|
||||
buf[0]='-';
|
||||
if(m & DMEXCL)
|
||||
|
|
Loading…
Reference in a new issue