summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-01-07 10:47:21 -0500
committerTavian Barnes <tavianator@tavianator.com>2020-01-07 10:47:21 -0500
commit44d0d73b308eb19593f7c4e1232cbaa4c0078ae8 (patch)
tree5702c8c6394f345671c2f780f9f656af71fd7579 /eval.c
parent3fa560ca6e0d68938f71ed1984f63f8c5cb7e7cc (diff)
downloadbfs-44d0d73b308eb19593f7c4e1232cbaa4c0078ae8.tar.xz
eval: For -ls, print a + if a file has ACLs
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 1b3d211..cbfc74f 100644
--- a/eval.c
+++ b/eval.c
@@ -612,8 +612,9 @@ bool eval_fls(const struct expr *expr, struct eval_state *state) {
uintmax_t blocks = ((uintmax_t)statbuf->blocks*BFS_STAT_BLKSIZE + 1023)/1024;
char mode[11];
format_mode(statbuf->mode, mode);
+ char acl = bfs_check_acl(ftwbuf) > 0 ? '+' : ' ';
uintmax_t nlink = statbuf->nlink;
- if (fprintf(file, "%9ju %6ju %s %3ju ", ino, blocks, mode, nlink) < 0) {
+ if (fprintf(file, "%9ju %6ju %s%c %2ju ", ino, blocks, mode, acl, nlink) < 0) {
goto error;
}