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

Andrew Vagin avagin at parallels.com
Wed Dec 4 02:04:42 PST 2013


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.

> +#ifndef __CRIU_LIB_H__
> +#define __CRIU_LIB_H__
> +
> +#include "rpc.pb-c.h"

Why do we need this header here?

> +
> +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

> +
> +#endif /* __CRIU_LIB_H__ */
> -- 
> 1.8.1.2
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list