aboutsummaryrefslogtreecommitdiff
path: root/toys/ls.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2012-07-21 22:45:05 -0500
committerRob Landley <rob@landley.net>2012-07-21 22:45:05 -0500
commit31f49e7968db5d0d569513992baa6d25dde8aa58 (patch)
tree3bdc8d2a0cbff6a7ad6dfdd6f741f2937448ff8e /toys/ls.c
parent6ba38c2c79c12c5f2227ee4a87c9875fae407332 (diff)
downloadtoybox-31f49e7968db5d0d569513992baa6d25dde8aa58.tar.gz
Make chmod +w respect umask, implement +s and +t, fix ls to show suid/sgid/stid without x bit.
Diffstat (limited to 'toys/ls.c')
-rw-r--r--toys/ls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/ls.c b/toys/ls.c
index 6d0050fd..561b3534 100644
--- a/toys/ls.c
+++ b/toys/ls.c
@@ -374,7 +374,7 @@ static void listfiles(int dirfd, struct dirtree *indir)
c = i%3;
if (!c && (mode & (1<<((d=i/3)+9)))) {
c = "tss"[d];
- if (!bit) c &= 0x20;
+ if (!bit) c &= ~0x20;
} else c = bit ? "xwr"[c] : '-';
perm[9-i] = c;
}