Files
cloud-hypervisor/block
Anatol Belski 6a1dee64e7 block: qcow: Read the image magic positionally
detect_image_type saved the cursor, rewound, read the magic, then
restored the cursor. Read the four magic bytes with read_exact_at at
offset 0 and decode with from_be_bytes, so the save, rewind, and
restore go away. BeUint moves to the test module, its only remaining
user in this file.

The result is unchanged.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-07-01 19:31:16 +00:00
..