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

Ruslan Kuprieiev kupruser at gmail.com
Tue Dec 2 04:29:43 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 1cc8865..75bd810 100644
--- a/cr-service.c
+++ b/cr-service.c
@@ -693,6 +693,7 @@ more:
 		break;
 
 	default:
+		cr_errno = ENOTSUP;
 		send_criu_err(sk, "Invalid req");
 		break;
 	}
diff --git a/include/cr-errno.h b/include/cr-errno.h
index ff3f06c..09292e4 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
  * EBADRQC	- bad options
+ * ENOTSUP	- invalid request
  */
 
 #endif /* __CR_ERRNO_H__ */
-- 
1.9.3



More information about the CRIU mailing list