From 91b79c582c09ad9e8c3b860b3a388a540f926fc1 Mon Sep 17 00:00:00 2001 From: grai Date: Tue, 22 Jul 2008 03:22:33 +1000 Subject: 9p: honour the -l flag to ls --- src/cmd/9p.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/cmd/9p.c') diff --git a/src/cmd/9p.c b/src/cmd/9p.c index 105fd3a1..ed80f5a6 100644 --- a/src/cmd/9p.c +++ b/src/cmd/9p.c @@ -554,18 +554,25 @@ xls(int argc, char **argv) len[j] = l; } } - for(i=0; itype = 'M'; d->dev = 0; - print("%M %C %d %s %s %lld %T %q\n", - d->mode, d->type, d->dev, - d->uid, d->gid, d->length, d->mtime, d->name); + if(lflag) + print("%M %C %d %s %s %lld %T %q\n", + d->mode, d->type, d->dev, + d->uid, d->gid, d->length, d->mtime, d->name); + else + print("%q\n", d->name); } free(d); } -- cgit v1.2.3