The comment string claims xputs() to write, flush and check error.
However the 'flush' operation is actually missing due to 3e0e8c6
changing the default buffering mode from 'line' to 'block'.
From 861e020ceb5971ba202fbd75ad2669c9e5e94dad Mon Sep 17 00:00:00 2001
From: Yi-Yo Chiang <[email protected]>
Date: Thu, 16 May 2024 18:26:57 +0800
Subject: [PATCH] xputs: Do flush
The comment string claims xputs() to write, flush and check error.
However the 'flush' operation is actually missing due to 3e0e8c6
changing the default buffering mode from 'line' to 'block'.
Change-Id: I474f04fc20df17f0e0b86419e49ba8446460a081
---
lib/xwrap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/xwrap.c b/lib/xwrap.c
index e39dfce6..62b91ab5 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -176,6 +176,7 @@ void xputsn(char *s)
void xputs(char *s)
{
puts(s);
+ fflush(stdout);
xferror(stdout);
}
--
2.45.0.rc1.225.g2a3ae87e7f-goog
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net