mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
migration/rdma: Split qemu_fopen_rdma() into input/output functions
This is how everything else in QEMUFile is structured. As a bonus they are three less lines of code. Reviewed-by: Peter Xu <peterx@redhat.com> Message-ID: <20230530183941.7223-17-quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
ac6f48e15d
commit
697c4c86ab
3 changed files with 19 additions and 33 deletions
|
@ -100,18 +100,6 @@ int qemu_file_shutdown(QEMUFile *f)
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool qemu_file_mode_is_not_valid(const char *mode)
|
||||
{
|
||||
if (mode == NULL ||
|
||||
(mode[0] != 'r' && mode[0] != 'w') ||
|
||||
mode[1] != 'b' || mode[2] != 0) {
|
||||
fprintf(stderr, "qemu_fopen: Argument validity check failed\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static QEMUFile *qemu_file_new_impl(QIOChannel *ioc, bool is_writable)
|
||||
{
|
||||
QEMUFile *f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue