[CRIU] [PATCH 5/8] cr-service: set cr_errno to EBADRQC if set_opts_from_req fails

Ruslan Kuprieiev kupruser at gmail.com
Tue Dec 2 04:29:42 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..1cc8865 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 = EBADRQC;
 	return -1;
 }
 
diff --git a/include/cr-errno.h b/include/cr-errno.h
index f86bba8..ff3f06c 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
+ * EBADRQC	- bad options
  */
 
 #endif /* __CR_ERRNO_H__ */
-- 
1.9.3



More information about the CRIU mailing list