2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00

cr-errno: initial commit

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Ruslan Kuprieiev 2014-12-11 22:55:10 +02:00 committed by Pavel Emelyanov
parent 2b2d6732cc
commit ef283e505c
3 changed files with 20 additions and 0 deletions

View File

@ -69,6 +69,7 @@ endif
obj-y += cr-service.o
obj-y += sd-daemon.o
obj-y += plugin.o
obj-y += cr-errno.o
ifneq ($(MAKECMDGOALS),clean)
incdeps := y

12
cr-errno.c Normal file
View File

@ -0,0 +1,12 @@
static int cr_errno;
int get_cr_errno(void)
{
return cr_errno;
}
void set_cr_errno(int new_err)
{
if (!cr_errno)
cr_errno = new_err;
}

7
include/cr-errno.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef __CR_ERRNO_H__
#define __CR_ERRNO_H__
void set_cr_errno(int err);
int get_cr_errno(void);
#endif /* __CR_ERRNO_H__ */