diff options
author | Kamil Dudka <kdudka@redhat.com> | 2008-08-01 19:33:45 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-08-01 22:13:25 +0200 |
commit | 84f6abfe00b4ab533145623638b417a2221f9c75 (patch) | |
tree | 8fe27700e521e70a538ba114ccc86f984c8cb3c8 /src/dircolors.c | |
parent | 00c6aacf318a6ef0db4895b08d572d924eab90d0 (diff) | |
download | coreutils-84f6abfe00b4ab533145623638b417a2221f9c75.tar.xz |
ls: --color now highlights files with capabilities, too
* src/ls.c: [HAVE_CAP] Include <sys/capability.h>.
(has_capability): New function for capability detection.
(print_color_indicator): Colorize file with capability.
* m4/jm-macro.m4: New configure option: --disable-libcap.
Check for libcap usability.
* src/Makefile.am (dir_LDADD, ls_LDADD, ...): Append $(LIB_CAP).
* src/dircolors.c: Update color lists.
* src/dircolors.hin: Mention new CAPABILITY color attribute.
* tests/ls/capability: Test for ls - colorize file with capability.
* tests/Makefile.am (root_tests): Add ls/capability.
* NEWS: Mention the change.
Diffstat (limited to 'src/dircolors.c')
-rw-r--r-- | src/dircolors.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dircolors.c b/src/dircolors.c index 56194f793..79109b934 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -63,14 +63,14 @@ static const char *const slack_codes[] = "SYMLINK", "ORPHAN", "MISSING", "FIFO", "PIPE", "SOCK", "BLK", "BLOCK", "CHR", "CHAR", "DOOR", "EXEC", "LEFT", "LEFTCODE", "RIGHT", "RIGHTCODE", "END", "ENDCODE", "SUID", "SETUID", "SGID", "SETGID", "STICKY", - "OTHER_WRITABLE", "OWR", "STICKY_OTHER_WRITABLE", "OWT", NULL + "OTHER_WRITABLE", "OWR", "STICKY_OTHER_WRITABLE", "OWT", "CAPABILITY", NULL }; static const char *const ls_codes[] = { "no", "no", "fi", "rs", "di", "ln", "ln", "ln", "or", "mi", "pi", "pi", "so", "bd", "bd", "cd", "cd", "do", "ex", "lc", "lc", "rc", "rc", "ec", "ec", - "su", "su", "sg", "sg", "st", "ow", "ow", "tw", "tw", NULL + "su", "su", "sg", "sg", "st", "ow", "ow", "tw", "tw", "ca", NULL }; #define array_len(Array) (sizeof (Array) / sizeof *(Array)) verify (array_len (slack_codes) == array_len (ls_codes)); |