[CRIU] [PATCH 0/6] crit: hex values, v2
Ruslan Kuprieiev
kupruser at gmail.com
Mon Jan 19 06:10:52 PST 2015
Pavel reported that decimal values for some fields are hard to read,
because people used to see hex values in there. Unfortunatelly, json
doesn't support hex representation of integers, so we can only store
them as hex strings. Not all field need to be represented as hex
strings, so this set introduces a custom field option called "criu"
to use in our proto files. One should use [(criu).hex = true] to mark
which field should be represented as a hex string. pb2dict module
from pycriu package will look into field options and if he finds that
criu.hex is set to True, it will convert such field to/from hex string.
Though, such behaviour is optional and user can request it by specifying
--format hex when calling crit decode("crit encode" in its turn, detects
such fields automatically and doesn't require any special cmdline options
to be set).
This set also contains two patches to mark field that need to be treated
as hex numbers, but they don't cover all such fields, so feel free to mark
fields that you need.
v2, support for 'all hex' messages and other fixes
Reported-by: Pavel Emelyanov <xemul at parallels.com>
Ruslan Kuprieiev (6):
protobuf: add opts.proto
crit: add --format hex option
protobuf: core: use hex(custom field option) for blk_sigset field
protobuf: core-x86: mark gregs with hex field option
test: crit: use --format hex
make: fix double compilation
.gitignore | 2 ++
Makefile | 3 +--
crit | 14 ++++++++-----
protobuf/Makefile | 6 ++++++
protobuf/core-x86.proto | 4 +++-
protobuf/core.proto | 4 +++-
protobuf/google/protobuf/descriptor.proto | 1 +
protobuf/opts.proto | 10 +++++++++
pycriu/images/Makefile | 2 +-
pycriu/images/images.py | 24 ++++++++++-----------
pycriu/images/pb2dict.py | 35 ++++++++++++++++++++++++-------
test/crit/test.sh | 2 +-
12 files changed, 77 insertions(+), 30 deletions(-)
create mode 120000 protobuf/google/protobuf/descriptor.proto
create mode 100644 protobuf/opts.proto
--
2.1.0
More information about the CRIU
mailing list