[CRIU] [PATCH 4/8] parasite: Add missing 'void' in function
declarations
Stanislav Kinsbursky
skinsbursky at parallels.com
Wed Feb 22 04:32:19 EST 2012
22.02.2012 13:25, Cyrill Gorcunov пишет:
> On Wed, Feb 22, 2012 at 01:20:55PM +0400, Stanislav Kinsbursky wrote:
>>
>> I have some other cleanup solution. Consider it, please:
>> 1) Pass args pointer to every to command handler function (even if
>> it's not used inside). BTW, explicit type cast for void pointers is
>> redundant.
>
> There were a patch which makes so. This one is just to make it
> step-by-step solution, so the code would work after every single
> commit in the series.
>
>> 2) Call SET_PARASITE_STATUS_SUCCESS(st) only (!) in
>> parasite_service() in case of command success. Thus collect of
>> command handler function result is required.
>
> Yeah, on one hand this indeed would make it cleaner, on the
> other hands this would be strange that callees might set
> error codes to status but will not set up success status.
> So, I dont know.
Ok. remove your SET_PARASITE_STATUS_SUCCESS then and make it even easier.
Let's there will be only one place, where SET_PARASITE_STATUS is called -
parasite_service().
And all command handlers receives pointer for combined value of syscall error
code and line number (int per each; or even 2 variables) and updates it's
content and returns error value to parasite_service() in case of error, or zeros
in case of success.
--
Best regards,
Stanislav Kinsbursky
More information about the CRIU
mailing list