From 3f614e449896ff53628b9e5ed90a9c3ca457ad7c Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Wed, 1 Feb 2012 16:02:02 +0300 Subject: [PATCH] restore: fix length of spliced data Signed-off-by: Andrey Vagin Acked-by: Pavel Emelyanov Signed-off-by: Cyrill Gorcunov --- cr-restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cr-restore.c b/cr-restore.c index 63e28ba37..0aeedfd7d 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -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); 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) { pr_perror("\t%x: Error splicing data", e->pipeid); return -1;