Re: [patch] virt-convert add disk signature into virt-image format export

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux