Commit be6a7fea authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov Committed by Cyrill Gorcunov

cr: reuse zero_page_entry in fixup_pages_data

fix compilation error:
cr-restore.c:621:13: error: variably modified ‘zpage’ at file scope
Signed-off-by: 's avatarKonstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent b8b0dd42
...@@ -618,8 +618,6 @@ static inline bool should_restore_page(int pid, unsigned long va) ...@@ -618,8 +618,6 @@ static inline bool should_restore_page(int pid, unsigned long va)
return si->pid == pid; return si->pid == pid;
} }
static char zpage[PAGE_SIZE];
static int fixup_pages_data(int pid, int fd) static int fixup_pages_data(int pid, int fd)
{ {
int shfd; int shfd;
...@@ -675,9 +673,7 @@ static int fixup_pages_data(int pid, int fd) ...@@ -675,9 +673,7 @@ static int fixup_pages_data(int pid, int fd)
} }
close(shfd); close(shfd);
va = 0; write_img(fd, &zero_page_entry);
write(fd, &va, sizeof(va));
write(fd, zpage, sizeof(zpage));
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment