aboutsummaryrefslogtreecommitdiffstats
path: root/src/ckutil.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-11-16 14:43:19 +0200
committergramanas <anastasis.gramm2@gmail.com>2018-11-16 14:43:19 +0200
commit54ae271dfc5f8405233ed320b2e9bd821ee8210f (patch)
tree9b27941b0e5cc0aa5ba805e1bcb9f8d7ff965592 /src/ckutil.c
parent97e14c73be6684259e235a92cc575ea39a04fc7e (diff)
downloadck-54ae271dfc5f8405233ed320b2e9bd821ee8210f.tar.gz
ck-54ae271dfc5f8405233ed320b2e9bd821ee8210f.tar.bz2
ck-54ae271dfc5f8405233ed320b2e9bd821ee8210f.zip
Code restructure/simplification, restore regression test
Diffstat (limited to 'src/ckutil.c')
-rw-r--r--src/ckutil.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ckutil.c b/src/ckutil.c
index fde5e24..2b807de 100644
--- a/src/ckutil.c
+++ b/src/ckutil.c
@@ -228,3 +228,17 @@ int y_or_n_prompt() {
}
return 0;
}
+
+void decorate_entry(char *entry, int secret, int primary, const char *path) {
+ if (primary) {
+ strcat(entry, " [p]");
+ }
+
+ if (secret) {
+ strcat(entry, " [s]");
+ }
+ /* root */
+ if (util_is_link_owned_by_root(path)) {
+ strcat(entry, " [root]");
+ }
+}