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

Kinsbursky Stanislav skinsbursky at openvz.org
Mon Mar 5 11:16:59 EST 2012


05.03.2012 19:47, Pavel Emelyanov пишет:
> 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.


No, this is not good since I'm going to introduce FDINFO_SK, which fd have to be 
handled in the same way as FDINFO_FD.

-- 
Best regards,
Stanislav Kinsbursky




More information about the CRIU mailing list