aports/main/tftp-hpa/fix-prompt-flush.patch
2022-10-14 15:14:04 +02:00

13 lines
422 B
Diff

doesn't flush by default, so the prompt is never printed
diff --git a/tftp/main.c b/tftp/main.c
index 4b09840..80e222e 100644
--- a/tftp/main.c
+++ b/tftp/main.c
@@ -806,6 +806,7 @@ static void command(void)
exit(0); /* EOF */
#else
fputs(prompt, stdout);
+ fflush(stdout);
if (fgets(line, LBUFLEN, stdin) == 0) {
if (feof(stdin)) {
exit(0);