[CRIU] [PATCH 2/7] pycriu: add python package, v3

Pavel Emelyanov xemul at parallels.com
Tue Dec 2 12:07:19 PST 2014


On 12/02/2014 10:55 PM, Ruslan Kuprieiev wrote:
> On 12/02/2014 04:28 PM, Pavel Emelyanov wrote:
>> On 12/02/2014 05:22 PM, Ruslan Kuprieiev wrote:
>>>
>>> It is used right below:
>>> +        self.magic_name = magic
>>> +        self.magic = eval(magic+"_MAGIC")
>>> +        self.head_name = head
>>> +        self.head = eval(head)
>>> +        if single:
>>> +            self.body_name = ''
>>> +            self.body = lambda : None
>>> +        else:
>>> +            if body == '':
>>> +                body = head
>>> +            self.body_name = body
>>> +            self.body = eval(body)
>>
>> This usage doesn't seem to be correct. You should provide the
>> list of objects present in the image regardless of whether it's
>> a single-entry one or not :)
>>
>> Oh, and while we're at it. You've made the 'body' to be optional
>> parameter, while in real images optional is the header one. Thus
>> I'd make the header be optional.
>>
> 
> Sorry, I missed this part of letter.
> 
> Oh! Header is optional! I was confused by the structure of our images
> all this time. I was wondering why pagemap.img has such a weird
> structure. But now I see. Thanks!

Feel free to update the http://criu.org/What%27s_bad_with_V1_images when
you find some stupidity in the way images are organized.



More information about the CRIU mailing list