projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75fea67
)
Make sendfile use libbuf.
author
Rob Landley
<rob@landley.net>
Fri, 28 Nov 2014 22:57:45 +0000
(16:57 -0600)
committer
Rob Landley
<rob@landley.net>
Fri, 28 Nov 2014 22:57:45 +0000
(16:57 -0600)
lib/xwrap.c
patch
|
blob
|
history
diff --git
a/lib/xwrap.c
b/lib/xwrap.c
index
6216d91
..
a2dd1c6
100644
(file)
--- a/
lib/xwrap.c
+++ b/
lib/xwrap.c
@@
-587,13
+587,12
@@
void xpidfile(char *name)
void xsendfile(int in, int out)
{
long len;
- char buf[4096];
if (in<0) return;
for (;;) {
- len = xread(in,
buf, 4096
);
+ len = xread(in,
libbuf, sizeof(libbuf)
);
if (len<1) break;
- xwrite(out, buf, len);
+ xwrite(out,
lib
buf, len);
}
}