diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-01-07 10:47:21 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-01-07 10:47:21 -0500 |
commit | 44d0d73b308eb19593f7c4e1232cbaa4c0078ae8 (patch) | |
tree | 5702c8c6394f345671c2f780f9f656af71fd7579 | |
parent | 3fa560ca6e0d68938f71ed1984f63f8c5cb7e7cc (diff) | |
download | bfs-44d0d73b308eb19593f7c4e1232cbaa4c0078ae8.tar.xz |
eval: For -ls, print a + if a file has ACLs
-rw-r--r-- | eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |