From 44d0d73b308eb19593f7c4e1232cbaa4c0078ae8 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 7 Jan 2020 10:47:21 -0500 Subject: eval: For -ls, print a + if a file has ACLs --- eval.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'eval.c') 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; } -- cgit v1.2.3