diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2020-11-19 06:05:28 -0500 |
---|---|---|
committer | Thanos <tmakatos@gmail.com> | 2020-11-20 10:15:32 +0000 |
commit | 012b3aba0addcfa14788494011dea848a3dcdca9 (patch) | |
tree | fc6722abfbe2d7b16428f53d065b4bfe91105f3f /lib/tran_sock.c | |
parent | f54581b9d4837e92cf644b48505e5419d8df72cb (diff) | |
download | libvfio-user-012b3aba0addcfa14788494011dea848a3dcdca9.zip libvfio-user-012b3aba0addcfa14788494011dea848a3dcdca9.tar.gz libvfio-user-012b3aba0addcfa14788494011dea848a3dcdca9.tar.bz2 |
move migration into separate file
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/tran_sock.c')
-rw-r--r-- | lib/tran_sock.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/tran_sock.c b/lib/tran_sock.c index ef811e8..b505108 100644 --- a/lib/tran_sock.c +++ b/lib/tran_sock.c @@ -45,6 +45,7 @@ #include "muser.h" #include "muser_priv.h" #include "tran_sock.h" +#include "migration.h" #define MAX_FDS 8 @@ -395,11 +396,6 @@ recv_version(lm_ctx_t *lm_ctx, int sock, uint16_t *msg_idp, } #endif - /* - * FIXME: incorrect, if the client doesn't give a pgsize value, it means "no - * migration support", handle this - */ - lm_ctx->migration.pgsize = sysconf(_SC_PAGESIZE); lm_ctx->client_max_fds = 1; if (vlen > sizeof (*cversion)) { @@ -434,7 +430,7 @@ send_version(lm_ctx_t *lm_ctx, int sock, uint16_t msg_id, "\"pgsize\":%zu" "}" "}" - "}", MAX_FDS, lm_ctx->migration.pgsize); + "}", MAX_FDS, migration_get_pgsize(lm_ctx->migration)); if (ret == -1) { ret = -ENOMEM; |