[CRIU] [PATCH 6/8] cr-service: set cr_errno to EBADRQC if request is invalid

Ruslan Kuprieiev kupruser at gmail.com
Mon Dec 1 14:52:41 PST 2014


Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 cr-service.c       | 1 +
 include/cr-errno.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/cr-service.c b/cr-service.c
index e1a0403..8b5ccab 100644
--- a/cr-service.c
+++ b/cr-service.c
@@ -693,6 +693,7 @@ more:
 		break;
 
 	default:
+		cr_errno = EBADRQC;
 		send_criu_err(sk, "Invalid req");
 		break;
 	}
diff --git a/include/cr-errno.h b/include/cr-errno.h
index a8f1428..53cd65a 100644
--- a/include/cr-errno.h
+++ b/include/cr-errno.h
@@ -6,6 +6,7 @@ extern int cr_errno;
  * ESRCH	- no process can be found corresponding to that specified by pid
  * EEXIST	- process with such pid already exists
  * EINVAL	- bad options
+ * EBADRQC	- invalid request
  */
 
 #endif /* __CR_ERRNO_H__ */
-- 
1.9.3



More information about the CRIU mailing list