[et-mgmt-tools] [patch] virt-convert add disk signature into virt-image format export

Joey Boggs jboggs at redhat.com
Tue Sep 30 21:46:39 UTC 2008


hehe yeah i realized that a sec ago but didnt want to waste an email 
correcting myself.



Cole Robinson wrote:
> Joey Boggs wrote:
>   
>> Here's a sample that works, just want to verify it's alright. Is 64MB 
>> too much/too little to read at one time?
>>
>>     
>
> 64MB certainly would be too much, but the below code
> is using 64KB :) Should be fine.
>
>   
>> f = open("test.raw","r")
>> m = sha.new()
>> while 1:
>>     chunk = f.read(65536)
>>     if not chunk:
>>         break
>>     m.update(chunk)
>> print m.hexdigest()
>>
>>     
>
> Thanks,
> Cole
>   




More information about the et-mgmt-tools mailing list