projects
/
splice.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13b7206
)
splice-cp: 0 return is not an error
author
Jens Axboe
<jens.axboe@oracle.com>
Fri, 8 Jun 2007 07:44:51 +0000
(09:44 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Fri, 8 Jun 2007 07:44:51 +0000
(09:44 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
splice-cp.c
patch
|
blob
|
blame
|
history
diff --git
a/splice-cp.c
b/splice-cp.c
index 022622fba0b77e9929ed390f5309d660559e1b9f..441d0aa39e25b79af55c33b7ca63d1333d1e087f 100644
(file)
--- a/
splice-cp.c
+++ b/
splice-cp.c
@@
-66,8
+66,10
@@
int main(int argc, char *argv[])
int this_len = min((off_t) BS, sb.st_size);
int ret = ssplice(in_fd, NULL, pfds[1], NULL, this_len, 0);
- if (ret <
=
0)
+ if (ret < 0)
return error("splice-in");
+ else if (!ret)
+ break;
sb.st_size -= ret;
while (ret > 0) {