mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qemu-file: Simplify qemu_file_shutdown()
Reviewed-by: Peter Xu <peterx@redhat.com> Message-ID: <20230530183941.7223-20-quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
9ccf83f486
commit
8c5ee0bfb8
1 changed files with 2 additions and 4 deletions
|
@ -65,8 +65,6 @@ struct QEMUFile {
|
||||||
*/
|
*/
|
||||||
int qemu_file_shutdown(QEMUFile *f)
|
int qemu_file_shutdown(QEMUFile *f)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We must set qemufile error before the real shutdown(), otherwise
|
* We must set qemufile error before the real shutdown(), otherwise
|
||||||
* there can be a race window where we thought IO all went though
|
* there can be a race window where we thought IO all went though
|
||||||
|
@ -96,10 +94,10 @@ int qemu_file_shutdown(QEMUFile *f)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qio_channel_shutdown(f->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL) < 0) {
|
if (qio_channel_shutdown(f->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL) < 0) {
|
||||||
ret = -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool qemu_file_mode_is_not_valid(const char *mode)
|
bool qemu_file_mode_is_not_valid(const char *mode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue