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

Ruslan Kuprieiev kupruser at gmail.com
Tue Dec 2 06:42:00 PST 2014


On 12/02/2014 04:36 PM, Pavel Emelyanov wrote:
> On 12/02/2014 05:34 PM, Ruslan Kuprieiev wrote:
>> On 12/02/2014 04:32 PM, Pavel Emelyanov wrote:
>>> On 12/02/2014 05:26 PM, Ruslan Kuprieiev wrote:
>>>> On 12/02/2014 04:20 PM, Pavel Emelyanov wrote:
>>>>>>> Let's make this call be ParseFromFile and pass here not
>>>>>>> sting, but an object from which we can read().
>>>>>>>
>>>>>>
>>>>>> It might be useful to have both ParseFromString and ParseFromFile.
>>>>>> I'll take a look.
>>>>>
>>>>> Having a filename at hands in criu_image class can be used to
>>>>> auto-detect the format by the filename "extension". E.g. the .img
>>>>> is the criu image, .txt is human-readable, .json is JSON and .xml
>>>>> is youknowwhat.
>>>>>
>>>>> So the convertion would look like
>>>>>
>>>>> crit convert --in reg-files.txt --out reg-files.img and it's
>>>>> clear what user wants.
>>>>>
>>>>
>>>> But CRIT allows us to use stdin\stdout by default, and they don't have
>>>> any extensions. Currently we are eading first few bites and judging
>>>> from them what type it is, which makes extension analysis redundant.
>>>
>>> Absolutely :) These will be just two ways of doing things.
>>>
>>
>> Why do we need two ways? Checking first few bits works just great.
>
> For input files yes, I'm talking about the output one. One option
> is better than two.
>

Ah! Yes, I see. Yes, currently we just suppose if input was
human-readable, then output should be img by default.
Ok, will add, thanks! =)


More information about the CRIU mailing list