qcow2_format.py: use strings to specify c-type of struct fields
commit5432a0db528cde9f58d6a843105a66c79b523a73
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Sat, 6 Jun 2020 08:18:00 +0000 (6 11:18 +0300)
committerEric Blake <eblake@redhat.com>
Tue, 9 Jun 2020 20:47:09 +0000 (9 15:47 -0500)
treeb53b3b7bc94c047b92d5498f6440df9263926443
parent621ca4988a20733eca43148396f910373e02d571
qcow2_format.py: use strings to specify c-type of struct fields

We are going to move field-parsing to super-class, this will be simpler
with simple string specifiers instead of variables.

For some reason, python doesn't allow the definition of ctypes variable
in the class alongside fields: it would not be available then for use
by the 'for' operator. Don't worry: ctypes will be moved to metaclass
soon.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Message-Id: <20200606081806.23897-8-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
tests/qemu-iotests/qcow2_format.py