[CRIU] [PATCH 2/4] tools: add criu2text
Ruslan Kuprieiev
kupruser at gmail.com
Tue Sep 30 03:52:24 PDT 2014
On 30.09.2014 13:30, Pavel Emelyanov wrote:
> On 09/30/2014 02:27 PM, Ruslan Kuprieiev wrote:
>> On 30.09.2014 12:54, Pavel Emelyanov wrote:
>>> ~snip~
>> Sure. Maybe make raw format to look like:
>> #magic
>> 0x12345
>> #0
>> MSG
>> #1
>> MSG
>> .....
>> ?
> Either
>
> #$magic
>
> or
>
> magic: $magic
>
> No need in two lines for this. The 1st one looks better.
Ok. Lets just use #$magic.
> ~snip~
>>> BTW, in the "nice" version of the output it would be nice to replace
>>> the magic with some name, e.g. the criu proto file one.
>> Not sure about .proto files. Especially, because we need that magic to
>> identify
>> pb entry, not just proto file where it is described. And because we need
>> to write that
>> magic back when converting from text to img.
>> We might just add pb_entry name, e.g.
>>
>> #magic
>> 0x12345
>> #0 pagemap_head
>> MSG
>> #1 pagemap_entry
>> MSG
>> #2
>> MSG
>> #3
>> MSG
>>
>> What do you think?
>
> Name of an object is cool in "nice" mode :) But I'd still replace
> magic with some name which 1:1 maps to magic.
Well, we could use *_MAGIC for that. E.g.:
PAGEMAP
#0 pagemap_head
MSG
#1 pagemap_entry
MSG
...
> ~snip~
Ok, so:
RAW:
#0x12345
#0
MSG
#1
MSG
.....
Nice:
#PAGEMAP
#0 pagemap_head
MSG
#1 pagemap_entry
MSG
....
Right?
More information about the CRIU
mailing list