mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00

Add functions to create a QEMUFile based on a unix URI, for saving or loading, for use by cpr-transfer mode to preserve CPR state. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/1736967650-129648-16-git-send-email-steven.sistare@oracle.com Signed-off-by: Fabiano Rosas <farosas@suse.de>
28 lines
858 B
C
28 lines
858 B
C
/*
|
|
* Copyright (c) 2021, 2024 Oracle and/or its affiliates.
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*/
|
|
|
|
#ifndef MIGRATION_CPR_H
|
|
#define MIGRATION_CPR_H
|
|
|
|
#include "qapi/qapi-types-migration.h"
|
|
|
|
#define QEMU_CPR_FILE_MAGIC 0x51435052
|
|
#define QEMU_CPR_FILE_VERSION 0x00000001
|
|
|
|
void cpr_save_fd(const char *name, int id, int fd);
|
|
void cpr_delete_fd(const char *name, int id);
|
|
int cpr_find_fd(const char *name, int id);
|
|
|
|
int cpr_state_save(MigrationChannel *channel, Error **errp);
|
|
int cpr_state_load(MigrationChannel *channel, Error **errp);
|
|
void cpr_state_close(void);
|
|
struct QIOChannel *cpr_state_ioc(void);
|
|
|
|
QEMUFile *cpr_transfer_output(MigrationChannel *channel, Error **errp);
|
|
QEMUFile *cpr_transfer_input(MigrationChannel *channel, Error **errp);
|
|
|
|
#endif
|