mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
restore: fix length of spliced data
Signed-off-by: Andrey Vagin <avagin@openvz.org> Acked-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
committed by
Cyrill Gorcunov
parent
229defc928
commit
3f614e4498
@@ -778,7 +778,7 @@ static int restore_pipe_data(struct pipe_entry *e, int wfd, int pipes_fd)
|
|||||||
pr_info("\t%x: Splicing data to %d\n", e->pipeid, wfd);
|
pr_info("\t%x: Splicing data to %d\n", e->pipeid, wfd);
|
||||||
|
|
||||||
while (size != e->bytes) {
|
while (size != e->bytes) {
|
||||||
ret = splice(pipes_fd, NULL, wfd, NULL, e->bytes, 0);
|
ret = splice(pipes_fd, NULL, wfd, NULL, e->bytes - size, 0);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
pr_perror("\t%x: Error splicing data", e->pipeid);
|
pr_perror("\t%x: Error splicing data", e->pipeid);
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user