mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-16 21:29:59 +01:00
Flush stdout when expecting user input on stdin.
This commit is contained in:
@@ -143,6 +143,7 @@ int yesDialog(const char *msg, void *usrptr __attribute__((unused)))
|
||||
if(isatty(STDIN_FILENO) && !opt_batch_mode) {
|
||||
log_std("\nWARNING!\n========\n");
|
||||
log_std("%s\n\nAre you sure? (Type uppercase yes): ", msg);
|
||||
fflush(stdout);
|
||||
if(getline(&answer, &size, stdin) == -1) {
|
||||
r = 0;
|
||||
/* Aborted by signal */
|
||||
|
||||
Reference in New Issue
Block a user