diff options
author | Adrian Reber <areber@redhat.com> | 2017-04-06 18:03:29 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@virtuozzo.com> | 2017-04-11 09:01:10 +0300 |
commit | fe974169a56bec09d36f83485ca7b5a595ae4794 (patch) | |
tree | 642a195f8aca820c2bd7da6fd3cd78582ce20c66 /images/rpc.proto | |
parent | bc169fefb1fa1460c33f4ffe5ea65c41901c7015 (diff) |
RPC: add version check interface
Instead of parsing the output of 'criu -V' this offers a RPC interface
to get CRIU's version. In a follow up patch a test script is included
to use the new interface:
./version.py
Connecting to CRIU in swrk mode to check the version:
RPC: Success
CRIU major 2
CRIU minor 12
CRIU gitid v2.12-635-g6d3ae4d
This change exports the following version fields:
* major
* minor
* gitid (optional)
* sublevel (optional)
* extra (optional)
* name (optional)
The optional gitid field is not set when CRIU is not built from git.
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Diffstat (limited to 'images/rpc.proto')
-rw-r--r-- | images/rpc.proto | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/images/rpc.proto b/images/rpc.proto index 394469ad8..2c65617aa 100644 --- a/images/rpc.proto +++ b/images/rpc.proto @@ -139,6 +139,8 @@ enum criu_req_type { CPUINFO_CHECK = 8; FEATURE_CHECK = 9; + + VERSION = 10; } /* @@ -191,4 +193,15 @@ message criu_resp { optional int32 cr_errno = 7; optional criu_features features = 8; optional string cr_errmsg = 9; + optional criu_version version = 10; +} + +/* Answer for criu_req_type.VERSION requests */ +message criu_version { + required int32 major = 1; + required int32 minor = 2; + optional string gitid = 3; + optional int32 sublevel = 4; + optional int32 extra = 5; + optional string name = 6; } |