aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-02-08 20:25:07 +0000
committerrsc <devnull@localhost>2005-02-08 20:25:07 +0000
commit8a7509066422b70655bebea156834cad6b76a86f (patch)
tree9869b5c000c3415ce140a5ef484bd461ec18645a
parent46199d113e9b607ecb42601246103ded683ca09e (diff)
downloadplan9port-8a7509066422b70655bebea156834cad6b76a86f.tar.gz
plan9port-8a7509066422b70655bebea156834cad6b76a86f.tar.bz2
plan9port-8a7509066422b70655bebea156834cad6b76a86f.zip
add mode chars
-rw-r--r--man/man1/ls.117
-rw-r--r--src/lib9/dirmodefmt.c8
2 files changed, 22 insertions, 3 deletions
diff --git a/man/man1/ls.1 b/man/man1/ls.1
index e4c950c5..edaf11cf 100644
--- a/man/man1/ls.1
+++ b/man/man1/ls.1
@@ -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
diff --git a/src/lib9/dirmodefmt.c b/src/lib9/dirmodefmt.c
index 8d796354..790b5fa0 100644
--- a/src/lib9/dirmodefmt.c
+++ b/src/lib9/dirmodefmt.c
@@ -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)