summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2025-10-01 08:33:54 -0700
committerPeter Xu <peterx@redhat.com>2025-10-03 09:48:02 -0400
commita9f9eee58bc5cfacc1aa5cb7a138b5a8c12a493c (patch)
tree77c6e33e6ced47efdbe75d4505f1f76ae8c91614 /include
parentdc79c7d5e15be05b23f24fab12f0d5e2bf831514 (diff)
downloadfocaccia-qemu-a9f9eee58bc5cfacc1aa5cb7a138b5a8c12a493c.tar.gz
focaccia-qemu-a9f9eee58bc5cfacc1aa5cb7a138b5a8c12a493c.zip
migration: add cpr_walk_fd
Add a helper to walk all CPR fd's and run a callback for each.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/1759332851-370353-3-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/migration/cpr.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/migration/cpr.h b/include/migration/cpr.h
index 3fc19a74ef..2b074d7a65 100644
--- a/include/migration/cpr.h
+++ b/include/migration/cpr.h
@@ -34,6 +34,9 @@ void cpr_resave_fd(const char *name, int id, int fd);
 int cpr_open_fd(const char *path, int flags, const char *name, int id,
                 Error **errp);
 
+typedef bool (*cpr_walk_fd_cb)(int fd);
+bool cpr_walk_fd(cpr_walk_fd_cb cb);
+
 MigMode cpr_get_incoming_mode(void);
 void cpr_set_incoming_mode(MigMode mode);
 bool cpr_is_incoming(void);