[klibc] [klibc:update-dash] [OUTPUT] Add ifdefs around MEM_OUT handling in outmem

klibc-bot for Herbert Xu herbert at gondor.apana.org.au
Thu Jan 24 19:15:25 PST 2019


Commit-ID:  8e826c07459371fae3b15ab05a65e178c08d8d60
Gitweb:     http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=8e826c07459371fae3b15ab05a65e178c08d8d60
Author:     Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Mon, 27 Oct 2014 15:44:51 +0800
Committer:  Ben Hutchings <ben at decadent.org.uk>
CommitDate: Fri, 25 Jan 2019 02:57:21 +0000

[klibc] [OUTPUT] Add ifdefs around MEM_OUT handling in outmem

MEM_OUT is only used by forkless backtick processing which we do
not currently support.

Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>

---
 usr/dash/output.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/usr/dash/output.c b/usr/dash/output.c
index 3e1ae256..4d3b4c27 100644
--- a/usr/dash/output.c
+++ b/usr/dash/output.c
@@ -154,10 +154,13 @@ buffered:
 	if (!bufsize) {
 		;
 	} else if (dest->buf == NULL) {
+#ifdef notyet
 		if (dest->fd == MEM_OUT && len > bufsize) {
 			bufsize = len;
 		}
+#endif
 		offset = 0;
+#ifdef notyet
 		goto alloc;
 	} else if (dest->fd == MEM_OUT) {
 		offset = bufsize;
@@ -169,6 +172,7 @@ buffered:
 		if (bufsize < offset)
 			goto err;
 alloc:
+#endif
 		INTOFF;
 		dest->buf = ckrealloc(dest->buf, bufsize);
 		dest->bufsize = bufsize;
@@ -184,7 +188,9 @@ alloc:
 		goto buffered;
 
 	if ((xwrite(dest->fd, p, len))) {
+#ifdef notyet
 err:
+#endif
 		dest->flags |= OUTPUT_ERR;
 	}
 #endif


More information about the klibc mailing list