From 4024cc8506139a8f04f3f99ba478880410af10f5 Mon Sep 17 00:00:00 2001 From: Lukas Straub Date: Thu, 20 Apr 2023 11:48:31 +0200 Subject: ram compress: Assert that the file buffer matches the result Before this series, "nothing to send" was handled by the file buffer being empty. Now it is tracked via param->result. Assert that the file buffer state matches the result. Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/qemu-file.h | 1 + 1 file changed, 1 insertion(+) (limited to 'migration/qemu-file.h') diff --git a/migration/qemu-file.h b/migration/qemu-file.h index 4f26bf6961..4ee58a87dd 100644 --- a/migration/qemu-file.h +++ b/migration/qemu-file.h @@ -113,6 +113,7 @@ size_t coroutine_mixed_fn qemu_get_buffer_in_place(QEMUFile *f, uint8_t **buf, s ssize_t qemu_put_compression_data(QEMUFile *f, z_stream *stream, const uint8_t *p, size_t size); int qemu_put_qemu_file(QEMUFile *f_des, QEMUFile *f_src); +bool qemu_file_buffer_empty(QEMUFile *file); /* * Note that you can only peek continuous bytes from where the current pointer -- cgit 1.4.1