mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-28 12:57:57 +00:00
Rename version protobuf RPC members
In rpc.proto the interface to query the CRIU version number uses major and minor as keywords. This creates errors when using the RPC definitions with C++: https://github.com/checkpoint-restore/criu/issues/625 In this commit the fields are renamed from major to major_number and from minor to minor_number. For existing programs using the RPC protobuf definition this should be a transparent change. Only for programs importing the latest rpc.proto it will require code changes. Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
parent
7f4779059d
commit
a256500185
@ -969,8 +969,8 @@ static int handle_version(int sk, CriuReq * msg)
|
|||||||
CriuVersion version = CRIU_VERSION__INIT;
|
CriuVersion version = CRIU_VERSION__INIT;
|
||||||
|
|
||||||
/* This assumes we will always have a major and minor version */
|
/* This assumes we will always have a major and minor version */
|
||||||
version.major = CRIU_VERSION_MAJOR;
|
version.major_number = CRIU_VERSION_MAJOR;
|
||||||
version.minor = CRIU_VERSION_MINOR;
|
version.minor_number = CRIU_VERSION_MINOR;
|
||||||
if (strcmp(CRIU_GITID, "0")) {
|
if (strcmp(CRIU_GITID, "0")) {
|
||||||
version.gitid = CRIU_GITID;
|
version.gitid = CRIU_GITID;
|
||||||
}
|
}
|
||||||
|
@ -211,8 +211,8 @@ message criu_resp {
|
|||||||
|
|
||||||
/* Answer for criu_req_type.VERSION requests */
|
/* Answer for criu_req_type.VERSION requests */
|
||||||
message criu_version {
|
message criu_version {
|
||||||
required int32 major = 1;
|
required int32 major_number = 1;
|
||||||
required int32 minor = 2;
|
required int32 minor_number = 2;
|
||||||
optional string gitid = 3;
|
optional string gitid = 3;
|
||||||
optional int32 sublevel = 4;
|
optional int32 sublevel = 4;
|
||||||
optional int32 extra = 5;
|
optional int32 extra = 5;
|
||||||
|
@ -66,8 +66,8 @@ if resp.type != rpc.VERSION:
|
|||||||
else:
|
else:
|
||||||
if resp.success:
|
if resp.success:
|
||||||
print('RPC: Success')
|
print('RPC: Success')
|
||||||
print('CRIU major %d' % resp.version.major)
|
print('CRIU major %d' % resp.version.major_number)
|
||||||
print('CRIU minor %d' % resp.version.minor)
|
print('CRIU minor %d' % resp.version.minor_number)
|
||||||
if resp.version.HasField('gitid'):
|
if resp.version.HasField('gitid'):
|
||||||
print('CRIU gitid %s' % resp.version.gitid)
|
print('CRIU gitid %s' % resp.version.gitid)
|
||||||
if resp.version.HasField('sublevel'):
|
if resp.version.HasField('sublevel'):
|
||||||
|
@ -32,8 +32,8 @@ if resp.type != rpc.VERSION:
|
|||||||
else:
|
else:
|
||||||
if resp.success:
|
if resp.success:
|
||||||
print('RPC: Success')
|
print('RPC: Success')
|
||||||
print('CRIU major %d' % resp.version.major)
|
print('CRIU major %d' % resp.version.major_number)
|
||||||
print('CRIU minor %d' % resp.version.minor)
|
print('CRIU minor %d' % resp.version.minor_number)
|
||||||
if resp.version.HasField('gitid'):
|
if resp.version.HasField('gitid'):
|
||||||
print('CRIU gitid %s' % resp.version.gitid)
|
print('CRIU gitid %s' % resp.version.gitid)
|
||||||
if resp.version.HasField('sublevel'):
|
if resp.version.HasField('sublevel'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user