[CRIU] [PATCH 2/8] lib: add criu.h

Ruslan Kuprieiev kupruser at gmail.com
Wed Dec 4 05:45:52 PST 2013


On 04.12.2013 14:42, Pavel Emelyanov wrote:
> On 12/04/2013 05:40 PM, Ruslan Kuprieiev wrote:
>> On 04.12.2013 14:04, Andrew Vagin wrote:
>>> On Wed, Dec 04, 2013 at 02:57:25PM +0400, Ruslan Kuprieiev wrote:
>>>> Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
>>>> ---
>>>>    lib/criu.h | 14 ++++++++++++++
>>>>    1 file changed, 14 insertions(+)
>>>>    create mode 100644 lib/criu.h
>>>>
>>>> diff --git a/lib/criu.h b/lib/criu.h
>>>> new file mode 100644
>>>> index 0000000..02939d3
>>>> --- /dev/null
>>>> +++ b/lib/criu.h
>>>> @@ -0,0 +1,14 @@
>>> Is this header going to be used by external applications?
>>> It the answer is yes, we need to add a copyright header.
>> I have no idea about them. Lets fix such small problems right after
>> applying patch, ok?
>>
>>>> +#ifndef __CRIU_LIB_H__
>>>> +#define __CRIU_LIB_H__
>>>> +
>>>> +#include "rpc.pb-c.h"
>>> Why do we need this header here?
>> To make user life one "include" easier=)
>>
>>>> +
>>>> +void criu_set_service_address(char *path);
>>>> +int criu_check(void);
>>>> +
>>>> +#define CRIU_ECONNECT	-1
>>>> +#define CRIU_EREQ	-2
>>>> +#define CRIU_ERESP	-3
>>>> +#define CRIU_ECHECK	-4
>>> Why do we need own error codes? Can we use constants from
>>> asm-generic/errno.h
>> Our own error codes are more informative.
> No, they are not. Plz, use standard errno codes.

But how can i get from standard codes, for example, whether lib failed 
because request is invalid? With this codes, i can.



More information about the CRIU mailing list