mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
Return path: Open a return path on QEMUFile for sockets
Postcopy needs a method to send messages from the destination back to the source, this is the 'return path'. Wire it up for 'socket' QEMUFile's. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
c1fcf220c9
commit
adc468e9b9
3 changed files with 79 additions and 9 deletions
|
@ -44,6 +44,18 @@ int qemu_file_shutdown(QEMUFile *f)
|
|||
return f->ops->shut_down(f->opaque, true, true);
|
||||
}
|
||||
|
||||
/*
|
||||
* Result: QEMUFile* for a 'return path' for comms in the opposite direction
|
||||
* NULL if not available
|
||||
*/
|
||||
QEMUFile *qemu_file_get_return_path(QEMUFile *f)
|
||||
{
|
||||
if (!f->ops->get_return_path) {
|
||||
return NULL;
|
||||
}
|
||||
return f->ops->get_return_path(f->opaque);
|
||||
}
|
||||
|
||||
bool qemu_file_mode_is_not_valid(const char *mode)
|
||||
{
|
||||
if (mode == NULL ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue