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

Ruslan Kuprieiev kupruser at gmail.com
Fri Dec 6 05:23:36 PST 2013


On 06.12.2013 14:16, Andrew Vagin wrote:
> On Fri, Dec 06, 2013 at 05:17:39PM +0400, Ruslan Kuprieiev wrote:
>> On 05.12.2013 09:49, Andrew Vagin wrote:
>>> On Thu, Dec 05, 2013 at 08:58:14AM +0400, Andrew Vagin wrote:
>>>> On Wed, Dec 04, 2013 at 05:40:29PM +0400, 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?
>>> You can find the correct template in the COPYING file.
>> What part of that huge text should be copied to criu.h ?
> The answer is here
> http://git.criu.org/?p=crtools.git;a=blob;f=COPYING;hb=HEAD

Sorry=).

>>>> I think it should be like this:
>>>>
>>>> /*
>>>>   * Copyright (C) 2013 Parallels, Inc.
>>>>   *
>>>>   * This library is free software; you can redistribute it and/or
>>>>   * modify it under the terms of the GNU Lesser General Public
>>>>   * License Version 2.1.
>>>>   *
>>>>   * This library is distributed in the hope that it will be useful,
>>>>   * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>>>   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>>>>   * Lesser General Public License for more details.
>>>>   *
>>>>   * You should have received a copy of the GNU Lesser General
>>>>   * Public License along with this library; if not, write to the
>>>>   * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
>>>>   * Boston, MA 02111-1307, USA.
>>>>   */
>>>>
>>>>>>> +#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.
>>>>>
>>>>>>> +
>>>>>>> +#endif /* __CRIU_LIB_H__ */
>>>>>>> -- 
>>>>>>> 1.8.1.2
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> CRIU mailing list
>>>>>>> CRIU at openvz.org
>>>>>>> https://lists.openvz.org/mailman/listinfo/criu
>>>> _______________________________________________
>>>> CRIU mailing list
>>>> CRIU at openvz.org
>>>> https://lists.openvz.org/mailman/listinfo/criu



More information about the CRIU mailing list