@@ -52,12 +52,14 @@ static gboolean fd_accept_incoming_migration(QIOChannel *ioc,
return G_SOURCE_REMOVE;
}
-void fd_start_incoming_migration(const char *infd, Error **errp)
+void fd_start_incoming_migration(const char *fdname, Error **errp)
{
QIOChannel *ioc;
- int fd;
+ int fd = monitor_fd_param(cur_mon, fdname, errp);
+ if (fd == -1) {
+ return;
+ }
- fd = strtol(infd, NULL, 0);
trace_migration_fd_incoming(fd);
ioc = qio_channel_new_fd(fd, errp);
@@ -16,7 +16,7 @@
#ifndef QEMU_MIGRATION_FD_H
#define QEMU_MIGRATION_FD_H
-void fd_start_incoming_migration(const char *path, Error **errp);
+void fd_start_incoming_migration(const char *fdname, Error **errp);
void fd_start_outgoing_migration(MigrationState *s, const char *fdname,
Error **errp);