Commit ad1aed62 authored by Pavel Emelyanov's avatar Pavel Emelyanov

img: Fixup seeks

There's no need in seeking file on core dump.
Fix explicit sizeof(u32)-s in restore seeks.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 40a79dbc
......@@ -724,8 +724,6 @@ static int dump_task_core(struct core_entry *core, int fd_core)
{
int ret;
lseek(fd_core, MAGIC_OFFSET, SEEK_SET);
pr_info("Dumping header ... ");
core->header.version = HEADER_VERSION;
......
......@@ -440,7 +440,7 @@ static int prepare_shared(int ps_fd)
if (!ret) {
futex_set(&task_entries->nr_in_progress, task_entries->nr);
lseek(ps_fd, sizeof(u32), SEEK_SET);
lseek(ps_fd, MAGIC_OFFSET, SEEK_SET);
show_saved_shmems();
show_saved_pipes();
......@@ -1174,7 +1174,7 @@ static int restore_task_with_children(void *_arg)
exit(1);
}
lseek(fd, sizeof(u32), SEEK_SET);
lseek(fd, MAGIC_OFFSET, SEEK_SET);
while (1) {
ret = read_img(fd, &e);
if (ret < 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