* to be blocked here.
*/
qemu_savevm_state_complete_precopy_iterable(s->to_dst_file, false);
- qemu_put_byte(s->to_dst_file, QEMU_VM_EOF);
+ qemu_savevm_state_end(s->to_dst_file);
/*
* We need the size of the VMstate data in Secondary side,
}
return 0;
}
+
+void qemu_savevm_state_end(QEMUFile *f)
+{
+ qemu_put_byte(f, QEMU_VM_EOF);
+}
+
/**
* qemu_savevm_command_send: Send a 'QEMU_VM_COMMAND' type element with the
* command and associated data.
}
}
- qemu_put_byte(f, QEMU_VM_EOF);
+ qemu_savevm_state_end(f);
qemu_fflush(f);
}
if (!in_postcopy) {
/* Postcopy stream will still be going */
- qemu_put_byte(f, QEMU_VM_EOF);
+ qemu_savevm_state_end(f);
if (vmdesc) {
json_writer_end_array(vmdesc);
}
}
- qemu_put_byte(f, QEMU_VM_EOF);
+ qemu_savevm_state_end(f);
return qemu_file_get_error(f);
}
uint64_t *can_postcopy);
int qemu_savevm_state_complete_precopy_iterable(QEMUFile *f, bool in_postcopy);
bool qemu_savevm_state_postcopy_prepare(QEMUFile *f, Error **errp);
+void qemu_savevm_state_end(QEMUFile *f);
void qemu_savevm_send_ping(QEMUFile *f, uint32_t value);
void qemu_savevm_send_open_return_path(QEMUFile *f);
int qemu_savevm_send_packaged(QEMUFile *f, const uint8_t *buf, size_t len);