[CRIU] [PATCH 5/8] cr-service: set cr_errno to EINVAL if set_opts_from_req fails
Ruslan Kuprieiev
kupruser at gmail.com
Mon Dec 1 14:52:40 PST 2014
Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
cr-service.c | 3 +++
include/cr-errno.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/cr-service.c b/cr-service.c
index 71d478d..e1a0403 100644
--- a/cr-service.c
+++ b/cr-service.c
@@ -30,6 +30,8 @@
#include "setproctitle.h"
+#include "cr-errno.h"
+
unsigned int service_sk_ino = -1;
static int recv_criu_msg(int socket_fd, CriuReq **msg)
@@ -341,6 +343,7 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
return 0;
err:
+ cr_errno = EINVAL;
return -1;
}
diff --git a/include/cr-errno.h b/include/cr-errno.h
index f86bba8..a8f1428 100644
--- a/include/cr-errno.h
+++ b/include/cr-errno.h
@@ -5,6 +5,7 @@ extern int cr_errno;
* List of symbolic error names:
* ESRCH - no process can be found corresponding to that specified by pid
* EEXIST - process with such pid already exists
+ * EINVAL - bad options
*/
#endif /* __CR_ERRNO_H__ */
--
1.9.3
More information about the CRIU
mailing list