diff --git a/cr-restore.c b/cr-restore.c index ea9aa5579..ae9b71e9e 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -648,7 +648,7 @@ static int fixup_pages_data(int pid, int fd) } close_safe(&pgfd); - pgfd = open_image_ro(CR_FD_PAGES_SHMEM, pid); + pgfd = open_image_ro(CR_FD_SHMEM_PAGES, pid); if (pgfd < 0) return -1; diff --git a/crtools.c b/crtools.c index f0e819a37..d0e2214be 100644 --- a/crtools.c +++ b/crtools.c @@ -46,8 +46,8 @@ struct cr_fd_desc_tmpl fdset_template[CR_FD_MAX] = { }, /* shared memory pages data */ - [CR_FD_PAGES_SHMEM] = { - .fmt = FMT_FNAME_PAGES_SHMEM, + [CR_FD_SHMEM_PAGES] = { + .fmt = FMT_FNAME_SHMEM_PAGES, .magic = PAGES_MAGIC, }, diff --git a/include/crtools.h b/include/crtools.h index 13c074861..b59624b38 100644 --- a/include/crtools.h +++ b/include/crtools.h @@ -21,7 +21,7 @@ enum { CR_FD_FDINFO, CR_FD_PAGES, - CR_FD_PAGES_SHMEM, + CR_FD_SHMEM_PAGES, CR_FD_CORE, CR_FD_PIPES, CR_FD_SHMEM, @@ -75,7 +75,7 @@ extern struct cr_fd_desc_tmpl fdset_template[CR_FD_MAX]; #define FMT_FNAME_FDINFO "fdinfo-%d.img" #define FMT_FNAME_PAGES "pages-%d.img" -#define FMT_FNAME_PAGES_SHMEM "pages-shmem-%d.img" +#define FMT_FNAME_SHMEM_PAGES "pages-shmem-%d.img" #define FMT_FNAME_CORE "core-%d.img" #define FMT_FNAME_CORE_OUT "core-%d.img.out" #define FMT_FNAME_PIPES "pipes-%d.img" @@ -119,7 +119,7 @@ struct cr_fdset { #define CR_FD_DESC_TASK (\ CR_FD_DESC_USE(CR_FD_FDINFO) |\ CR_FD_DESC_USE(CR_FD_PAGES) |\ - CR_FD_DESC_USE(CR_FD_PAGES_SHMEM) |\ + CR_FD_DESC_USE(CR_FD_SHMEM_PAGES) |\ CR_FD_DESC_USE(CR_FD_CORE) |\ CR_FD_DESC_USE(CR_FD_PIPES) |\ CR_FD_DESC_USE(CR_FD_SHMEM) |\ diff --git a/parasite-syscall.c b/parasite-syscall.c index 5b0753f12..ea9fa65c8 100644 --- a/parasite-syscall.c +++ b/parasite-syscall.c @@ -538,7 +538,7 @@ int parasite_dump_pages_seized(struct parasite_ctl *ctl, struct list_head *vma_a if (ret < 0) goto out; - ret = parasite_prep_file(CR_FD_PAGES_SHMEM, ctl, cr_fdset); + ret = parasite_prep_file(CR_FD_SHMEM_PAGES, ctl, cr_fdset); if (ret < 0) goto out; @@ -598,7 +598,7 @@ int parasite_dump_pages_seized(struct parasite_ctl *ctl, struct list_head *vma_a if (write_img(cr_fdset->fds[CR_FD_PAGES], &zero_page_entry)) goto out; - if (write_img(cr_fdset->fds[CR_FD_PAGES_SHMEM], &zero_page_entry)) + if (write_img(cr_fdset->fds[CR_FD_SHMEM_PAGES], &zero_page_entry)) goto out; pr_info("\n"); @@ -607,7 +607,7 @@ int parasite_dump_pages_seized(struct parasite_ctl *ctl, struct list_head *vma_a out: fchmod(cr_fdset->fds[CR_FD_PAGES], CR_FD_PERM); - fchmod(cr_fdset->fds[CR_FD_PAGES_SHMEM], CR_FD_PERM); + fchmod(cr_fdset->fds[CR_FD_SHMEM_PAGES], CR_FD_PERM); pr_info("----------------------------------------\n"); return ret;