[CRIU] [PATCH] show: rename used fdset helper to reflect it's purpose

Kinsbursky Stanislav skinsbursky at openvz.org
Wed Feb 8 08:49:29 EST 2012


Drop this.

08.02.2012 16:39, Kinsbursky Stanislav пишет:
> prep_cr_fdset_for_restore() is used only for "show" routines.
>
> Signed-off-by: Stanislav Kinsbursky<skinsbursky at parallels.com>
>
> ---
>   cr-show.c         |    6 +++---
>   crtools.c         |    2 +-
>   include/crtools.h |    2 +-
>   namespaces.c      |    2 +-
>   4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/cr-show.c b/cr-show.c
> index 33e60b8..5a41954 100644
> --- a/cr-show.c
> +++ b/cr-show.c
> @@ -535,7 +535,7 @@ static int cr_show_all(unsigned long pid, struct cr_options *opts)
>   	LIST_HEAD(pstree_list);
>   	int i, ret = -1;
>
> -	cr_fdset = prep_cr_fdset_for_restore(pid, CR_FD_DESC_PSTREE);
> +	cr_fdset = prep_cr_fdset_for_show(pid, CR_FD_DESC_PSTREE);
>   	if (!cr_fdset)
>   		goto out;
>
> @@ -551,7 +551,7 @@ static int cr_show_all(unsigned long pid, struct cr_options *opts)
>
>   	list_for_each_entry(item,&pstree_list, list) {
>
> -		cr_fdset = prep_cr_fdset_for_restore(item->pid, CR_FD_DESC_TASK);
> +		cr_fdset = prep_cr_fdset_for_show(item->pid, CR_FD_DESC_TASK);
>   		if (!cr_fdset)
>   			goto out;
>
> @@ -566,7 +566,7 @@ static int cr_show_all(unsigned long pid, struct cr_options *opts)
>   				if (item->threads[i] == item->pid)
>   					continue;
>
> -				cr_fdset_th = prep_cr_fdset_for_restore(item->threads[i], CR_FD_DESC_CORE);
> +				cr_fdset_th = prep_cr_fdset_for_show(item->threads[i], CR_FD_DESC_CORE);
>   				if (!cr_fdset_th)
>   					goto out;
>
> diff --git a/crtools.c b/crtools.c
> index 8cfe866..4b93de9 100644
> --- a/crtools.c
> +++ b/crtools.c
> @@ -214,7 +214,7 @@ err:
>   	return NULL;
>   }
>
> -struct cr_fdset *prep_cr_fdset_for_restore(int pid, unsigned long use_mask)
> +struct cr_fdset *prep_cr_fdset_for_show(int pid, unsigned long use_mask)
>   {
>   	unsigned int i;
>   	int ret = -1;
> diff --git a/include/crtools.h b/include/crtools.h
> index acb6a6d..fc8ff6f 100644
> --- a/include/crtools.h
> +++ b/include/crtools.h
> @@ -120,7 +120,7 @@ int cr_show(unsigned long pid, struct cr_options *opts);
>   int convert_to_elf(char *elf_path, int fd_core);
>
>   struct cr_fdset *cr_fdset_open(int pid, unsigned long use_mask, struct cr_fdset *);
> -struct cr_fdset *prep_cr_fdset_for_restore(int pid, unsigned long use_mask);
> +struct cr_fdset *prep_cr_fdset_for_show(int pid, unsigned long use_mask);
>   void close_cr_fdset(struct cr_fdset **cr_fdset);
>
>   void free_mappings(struct list_head *vma_area_list);
> diff --git a/namespaces.c b/namespaces.c
> index 1e245b8..16a3a1e 100644
> --- a/namespaces.c
> +++ b/namespaces.c
> @@ -118,7 +118,7 @@ int try_show_namespaces(int ns_pid)
>   {
>   	struct cr_fdset *fdset;
>
> -	fdset = prep_cr_fdset_for_restore(ns_pid, CR_FD_DESC_NS);
> +	fdset = prep_cr_fdset_for_show(ns_pid, CR_FD_DESC_NS);
>   	if (!fdset)
>   		return -1;
>
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://openvz.org/mailman/listinfo/criu


-- 
Best regards,
Stanislav Kinsbursky




More information about the CRIU mailing list