ask-password-api: move 'flag_file' from function parameter into AskPasswordRequest structure

This commit is contained in:
Lennart Poettering
2025-01-02 16:38:00 +01:00
parent 254649d576
commit 4ff3689ad2
5 changed files with 23 additions and 19 deletions
+2 -2
View File
@@ -738,7 +738,7 @@ static int prompt_root_password(int rfd) {
.message = msg1,
};
r = ask_password_tty(-EBADF, &req, /* until= */ 0, /* flags= */ 0, /* flag_file= */ NULL, &a);
r = ask_password_tty(-EBADF, &req, /* until= */ 0, /* flags= */ 0, &a);
if (r < 0)
return log_error_errno(r, "Failed to query root password: %m");
if (strv_length(a) != 1)
@@ -760,7 +760,7 @@ static int prompt_root_password(int rfd) {
req.message = msg2;
r = ask_password_tty(-EBADF, &req, /* until= */ 0, /* flags= */ 0, /* flag_file= */ NULL, &b);
r = ask_password_tty(-EBADF, &req, /* until= */ 0, /* flags= */ 0, &b);
if (r < 0)
return log_error_errno(r, "Failed to query root password: %m");
if (strv_length(b) != 1)