aboutsummaryrefslogtreecommitdiffstats
path: root/src/ckutil.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-11-13 13:22:53 +0200
committergramanas <anastasis.gramm2@gmail.com>2018-11-13 13:22:53 +0200
commit6a43f7bfdfdb693e877943490abd5839a630ad9d (patch)
tree35c48a0acf80e6288aef952f93caac3195ba55ec /src/ckutil.c
parentd015a5e66ac9b92bba4eb5020e7bf2384f65ed25 (diff)
downloadck-6a43f7bfdfdb693e877943490abd5839a630ad9d.tar.gz
ck-6a43f7bfdfdb693e877943490abd5839a630ad9d.tar.bz2
ck-6a43f7bfdfdb693e877943490abd5839a630ad9d.zip
Fixed homedir with restore and updated delete
Diffstat (limited to 'src/ckutil.c')
-rw-r--r--src/ckutil.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ckutil.c b/src/ckutil.c
index 8ae7e41..fde5e24 100644
--- a/src/ckutil.c
+++ b/src/ckutil.c
@@ -216,3 +216,15 @@ int util_is_link_owned_by_root(const char *link) {
}
return 0;
}
+
+int y_or_n_prompt() {
+ char c;
+
+ printf("[y/n] > ");
+ c = (char)getchar();
+
+ if (c == 'y') {
+ return 1;
+ }
+ return 0;
+}