mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Opening a raw backing file issued a seek to the end for its size and then rewound the cursor. RawBacking reads through read_exact_at, so the cursor reset was dead. Query the size through query_device_size, matching the crate convention and returning the right size for a block device backing file as well, and drop the rewind. The now unused SeekFrom import is removed. The result is unchanged. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>