Move the definition of struct CprFd to a header file so that it can be
referenced from more source files.

Signed-off-by: Dongli Zhang <[email protected]>
---
 include/migration/cpr.h | 8 ++++++++
 migration/cpr.c         | 8 --------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/migration/cpr.h b/include/migration/cpr.h
index 56fb67e6b4..e33eaf588b 100644
--- a/include/migration/cpr.h
+++ b/include/migration/cpr.h
@@ -18,6 +18,14 @@
 #define QEMU_CPR_FILE_VERSION   0x00000001
 #define CPR_STATE "CprState"
 
+typedef struct CprFd {
+    char *name;
+    unsigned int namelen;
+    int id;
+    int fd;
+    QLIST_ENTRY(CprFd) next;
+} CprFd;
+
 typedef QLIST_HEAD(CprFdList, CprFd) CprFdList;
 typedef QLIST_HEAD(CprVFIODeviceList, CprVFIODevice) CprVFIODeviceList;
 
diff --git a/migration/cpr.c b/migration/cpr.c
index bca43e9bf3..33ac74c1f3 100644
--- a/migration/cpr.c
+++ b/migration/cpr.c
@@ -28,14 +28,6 @@ static GHashTable *cpr_fds_hash;
 
 /****************************************************************************/
 
-typedef struct CprFd {
-    char *name;
-    unsigned int namelen;
-    int id;
-    int fd;
-    QLIST_ENTRY(CprFd) next;
-} CprFd;
-
 static const VMStateDescription vmstate_cpr_fd = {
     .name = "cpr fd",
     .version_id = 1,
-- 
2.43.5


Reply via email to