diff options
author | Ruslan Kuprieiev <kupruser@gmail.com> | 2015-01-19 17:10:54 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@parallels.com> | 2015-01-19 17:13:55 +0300 |
commit | 87da3e3437ca8318a9dbd0dbea4eba87bd69115b (patch) | |
tree | 59c2f65f87a408d46030186cdb54a9135a2f0bec /.gitignore | |
parent | 5feac803362f6ee175b2665f2877da309a5d75ec (diff) |
crit: add --format hex option
Pavel reported that decimal values for some fields are hard to read,
because people used to see hex values in there. Unfortunately, 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).
We need our proto files to compile with both protoc and
protoc-c compilers, which requires creating google/protobuf
directory with a symlink to /usr/include/google/protobuf/
descriptor.proto to make protoc-c and generated c files happy.
Reported-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Diffstat (limited to '.gitignore')
-rw-r--r-- | .gitignore | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index 977c782aa..3f284972a 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,8 @@ include/syscall.h include/syscall-codes.h protobuf/*.c protobuf/*.h +protobuf/google/protobuf/*.c +protobuf/google/protobuf/*.h include/version.h arch/x86/sys-exec-tbl.c arch/x86/syscalls.S |