From 54ae271dfc5f8405233ed320b2e9bd821ee8210f Mon Sep 17 00:00:00 2001 From: gramanas Date: Fri, 16 Nov 2018 14:43:19 +0200 Subject: Code restructure/simplification, restore regression test --- src/ckutil.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/ckutil.c') 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]"); + } +} -- cgit v1.2.3