I'd add a comment that correct current file offset is the responsibility of a caller.
Reviewed-by: Andrey Shinkevich <andrey.shinkev...@virtuozzo.com> ________________________________ From: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Sent: Thursday, June 4, 2020 8:41 PM To: qemu-bl...@nongnu.org <qemu-bl...@nongnu.org> Cc: qemu-devel@nongnu.org <qemu-devel@nongnu.org>; mre...@redhat.com <mre...@redhat.com>; kw...@redhat.com <kw...@redhat.com>; ebl...@redhat.com <ebl...@redhat.com>; Denis Lunev <d...@virtuozzo.com>; Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>; Andrey Shinkevich <andrey.shinkev...@virtuozzo.com> Subject: [PATCH v4 10/12] qcow2_format: refactor QcowHeaderExtension as a subclass of Qcow2Struct Only two fields we can parse by generic code, but that is better than nothing. Keep further refactoring of variable-length fields for another day. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> --- tests/qemu-iotests/qcow2_format.py | 51 ++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 16 deletions(-)