From: Zhuling zhuling8@huawei.com
Fix file dumping fail problem when the file seek op is null.
Conflict:NA Reference:https://gitee.com/src-openeuler/criu/pulls/21 Signed-off-by: Jingxian He hejingxian@huawei.com --- criu/files-reg.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/criu/files-reg.c b/criu/files-reg.c index 6747a3a..6bbcbee 100644 --- a/criu/files-reg.c +++ b/criu/files-reg.c @@ -2247,9 +2247,12 @@ static int do_open_reg(int ns_root_fd, struct reg_file_info *rfi, void *arg) if (!(rfi->rfe->flags & O_PATH)) { if (rfi->rfe->pos != -1ULL && lseek(fd, rfi->rfe->pos, SEEK_SET) < 0) { - pr_perror("Can't restore file pos"); - close(fd); - return -1; + pr_info("No ability to restore file pos"); + if (errno != ESPIPE) { + pr_perror("Can't restore file pos"); + close(fd); + return -1; + } } }