[CRIU] [PATCH 5/9] cr-service: set cr_errno to EBADRQC if set_opts_from_req fails
Ruslan Kuprieiev
kupruser at gmail.com
Thu Dec 11 12:55:14 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..99cba06 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:
+ set_cr_errno(EBADRQC);
return -1;
}
diff --git a/include/cr-errno.h b/include/cr-errno.h
index d2f7071..3e10192 100644
--- a/include/cr-errno.h
+++ b/include/cr-errno.h
@@ -8,6 +8,7 @@ int get_cr_errno(void);
* 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