mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 01:51:51 +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:
parent
2b2d6732cc
commit
ef283e505c
@ -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
12
cr-errno.c
Normal 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
7
include/cr-errno.h
Normal 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__ */
|
Loading…
x
Reference in New Issue
Block a user