Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs-progs: utils: flush stdout after prompt in ask_user()
When stdio is line buffered printf will not flush anything (on musl?), leaving the program hanging without displaying any prompt and weird dialogs such as the following: alpine:~# btrfstune -S 0 /dev/mmcblk1p1 WARNING: this is dangerous, clearing the seeding flag may cause the derived device not to be mountable! y WARNING: seeding flag is not set on /dev/mmcblk1p1 We are going to clear the seeding flag, are you sure? [y/N]: alpine:~# Forcing flush makes the prompt display properly. Signed-off-by: Dominique Martinet <[email protected]> Reviewed-by: Qu Wenruo <[email protected]>
- Loading branch information