summaryrefslogtreecommitdiff
path: root/src/ask-password-api.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-11-14 01:53:46 +0100
committerLennart Poettering <lennart@poettering.net>2010-11-14 19:59:10 +0100
commit260ab287953153a8b4ae13133adfdfc2b3514a46 (patch)
tree5cf5c5737b1c66c0acd912a1a2c7b3cf453551f1 /src/ask-password-api.c
parent612eb8e4598df4249a23895c57e006087536b357 (diff)
cryptsetup: support non-LUKS crypto partitions
Diffstat (limited to 'src/ask-password-api.c')
-rw-r--r--src/ask-password-api.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ask-password-api.c b/src/ask-password-api.c
index e4ee8adb4f..9f7023e328 100644
--- a/src/ask-password-api.c
+++ b/src/ask-password-api.c
@@ -480,3 +480,13 @@ finish:
return r;
}
+
+int ask_password_auto(const char *message, const char *icon, usec_t until, char **_passphrase) {
+ assert(message);
+ assert(_passphrase);
+
+ if (isatty(STDIN_FILENO))
+ return ask_password_tty(message, until, NULL, _passphrase);
+ else
+ return ask_password_agent(message, icon, until, _passphrase);
+}