[CRIU] [PATCH 09/20] cr-dump.c: introduced the multiarch support.

Pavel Emelyanov xemul at parallels.com
Wed Dec 12 10:58:57 EST 2012


> -		user_x86_fpregs_entry__init(fpregs);
> -		thread_info->fpregs = fpregs;
> +	core->mtype = CORE_ENTRY__MARCH;
>  
> -		/* These are numbers from kernel */
> -		fpregs->n_st_space	= 32;
> -		fpregs->n_xmm_space	= 64;
> -		fpregs->n_padding	= 24;
> -
> -		fpregs->st_space	= xzalloc(pb_repeated_size(fpregs, st_space));
> -		fpregs->xmm_space	= xzalloc(pb_repeated_size(fpregs, xmm_space));
> -		fpregs->padding		= xzalloc(pb_repeated_size(fpregs, padding));
> -
> -		if (!fpregs->st_space || !fpregs->xmm_space || !fpregs->padding)
> -			goto err;
> +	thread_core = xmalloc(sizeof(*thread_core));
> +	if (!thread_core)
> +		goto err;
> +	thread_core_entry__init(thread_core);
> +	core->thread_core = thread_core;
>  
> +	if (alloc_thread_info) {
> +		arch_alloc_thread_info(core);

Ret code check lost.

>  	}
>  
>  	if (alloc_tc) {
> @@ -887,7 +739,7 @@ err:
>  }
>  
>  static int dump_task_core_all(pid_t pid, const struct proc_pid_stat *stat,
> -		const struct parasite_dump_misc *misc, const struct parasite_ctl *ctl,
> +		const struct parasite_dump_misc *misc, struct parasite_ctl *ctl,

Why is const removed?

>  		const struct cr_fdset *cr_fdset,
>  		struct list_head *vma_area_list)
>  {


More information about the CRIU mailing list