diff options
-rw-r--r-- | sys/man/1/walk | 2 | ||||
-rw-r--r-- | sys/src/cmd/walk.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/man/1/walk b/sys/man/1/walk index 7263d32e4..92699e2eb 100644 --- a/sys/man/1/walk +++ b/sys/man/1/walk @@ -123,8 +123,6 @@ walk -fn1 -esp .IR ls (1), .IR du (1) .SH BUGS -Statfmt character `x' displays permissions as an integer. -.PP Manipulating ifs is a nuisance. .PP File names are assumed to not contain newlines. diff --git a/sys/src/cmd/walk.c b/sys/src/cmd/walk.c index cd83acca7..ec7636983 100644 --- a/sys/src/cmd/walk.c +++ b/sys/src/cmd/walk.c @@ -2,6 +2,7 @@ #include <libc.h> #include <bio.h> #include <String.h> +#include <fcall.h> int Cflag = 0; int uflag = 0; @@ -70,7 +71,7 @@ dofile(char *path, Dir *f, int pathonly) break; case 'q': Bprint(bout, "%ullx.%uld.%.2uhhx", f->qid.path, f->qid.vers, f->qid.type); break; case 's': Bprint(bout, "%lld", f->length); break; - case 'x': Bprint(bout, "%ulo", f->mode); break; + case 'x': Bprint(bout, "%M", f->mode); break; /* These two are slightly different, as they tell us about the fileserver instead of the file */ case 'D': Bprint(bout, "%ud", f->dev); break; @@ -250,6 +251,8 @@ main(int argc, char **argv) usage(); }ARGEND; + fmtinstall('M', dirmodefmt); + if((bout = Bfdopen(1, OWRITE)) == nil) sysfatal("Bfdopen: %r"); Blethal(bout, nil); |