summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Larson <mike@vyatta.com>2010-11-29 12:20:33 -0800
committerMichael Larson <mike@vyatta.com>2010-11-29 12:20:33 -0800
commitded8b9aa0879eb964a560959bc8204ad6dbc735f (patch)
tree44ce9cf668480506d62eb563262e33f0d2f5db14 /src
parentc499baf6614d669472c01187671c8d8e8336496a (diff)
downloadvyatta-cfg-ded8b9aa0879eb964a560959bc8204ad6dbc735f.tar.gz
vyatta-cfg-ded8b9aa0879eb964a560959bc8204ad6dbc735f.zip
fix for duplicate messages on some system commands.
Diffstat (limited to 'src')
-rw-r--r--src/cli_new.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cli_new.c b/src/cli_new.c
index 065d62c..9576047 100644
--- a/src/cli_new.c
+++ b/src/cli_new.c
@@ -2567,11 +2567,12 @@ system_out(const char *cmd, const char **outbuf)
}
else {
//parent
- char buf[1025];
- memset(buf,'\0',1025);
+ char buf[8192];
+ memset(buf,'\0',8192);
close(cp[1]);
- while (read(cp[0], &buf, 1024) > 0) {
+ while (read(cp[0], &buf, 8192) > 0) {
strcat((char*)*outbuf,buf);
+ memset(buf,'\0',8192);
}
//now wait on child to kick the bucket