On Wed, Jul 16, 2014 at 11:49:38PM +0400, Maria Kustova wrote: > + @staticmethod > + def _header(cluster_bits, img_size, backing_file_name=None): > + """Generate a random valid header""" > + meta_header = [ > + ['>4s', 0, "QFI\xfb", 'magic'], > + ['>I', 4, random.randint(2, 3), 'version'], > + ['>Q', 8, 0, 'backing_file_offset'], > + ['>I', 16, 0, 'backing_file_size'], > + ['>I', 20, cluster_bits, 'cluster_bits'], > + ['>Q', 24, img_size, 'size'], > + ['>I', 32, 0, 'crypt_method'], > + ['>I', 36, 0, 'l1_size'], > + ['>Q', 40, 0, 'l1_table_offset'], > + ['>Q', 48, 0, 'refcount_table_offset'], > + ['>I', 56, 0, 'refcount_table_clusters'], > + ['>I', 60, 0, 'nb_snapshots'], > + ['>Q', 64, 0, 'snapshots_offset'], > + ['>Q', 72, 0, 'incompatible_features'], > + ['>Q', 80, 0, 'compatible_features'], > + ['>Q', 88, 0, 'autoclear_features'], > + # Only refcount_order = 4 is supported by current (07.2014) > + # implementaation of QEMU
s/implementaation/implementation/
pgpkragU_ia8s.pgp
Description: PGP signature