diff options
Diffstat (limited to 'src/ckutil.c')
-rw-r--r-- | src/ckutil.c | 12 |
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; +} |