[CRIU] Re: [PATCH v2 11/11] dump: use fd_params->type for cwd and exe magic

Pavel Emelyanov xemul at parallels.com
Mon Mar 5 10:47:42 EST 2012


On 03/05/2012 04:39 PM, Kinsbursky Stanislav wrote:
> This is a cleanup patch. Use file entry type variablr for special files
> instead of file entry addr variable.

I like this. But cannot apply since it conflicts with previous and has one
thing worth fixing.

> Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
> 
> @@ -51,9 +51,9 @@ struct fdinfo_entry {
>  } __packed;
>  
>  #define fd_is_special(fe)		\
> -	(((fe)->type != FDINFO_FD)  ||	\
> -	 ((fe)->addr == FDINFO_CWD) ||	\
> -	 ((fe)->addr == FDINFO_EXE))
> +	(((fe)->type == FDINFO_MAP) ||	\
> +	 ((fe)->type == FDINFO_CWD) ||	\
> +	 ((fe)->type == FDINFO_EXE))

The

   #define fd_is_special(fe)	((de)->type != FDINFO_FD)

tastes more like a strawberry.

>  struct shmem_entry {
>  	u64	start;

Thanks,
Pavel


More information about the CRIU mailing list