diff options
author | William Henderson <william.henderson@nutanix.com> | 2023-08-03 15:49:21 +0000 |
---|---|---|
committer | John Levon <john.levon@nutanix.com> | 2023-09-15 13:05:01 +0100 |
commit | d6bb06b6689e280d62667d12b5a6c54cefcc3cba (patch) | |
tree | fd5d9454689fc6ce5a84c1ad612e04e54f6396cb /samples/server.c | |
parent | 71edb7b4dece0279331430998c0f5d09a3de2934 (diff) | |
download | libvfio-user-d6bb06b6689e280d62667d12b5a6c54cefcc3cba.zip libvfio-user-d6bb06b6689e280d62667d12b5a6c54cefcc3cba.tar.gz libvfio-user-d6bb06b6689e280d62667d12b5a6c54cefcc3cba.tar.bz2 |
fix: update sample to correctly start destination server
Signed-off-by: William Henderson <william.henderson@nutanix.com>
Diffstat (limited to 'samples/server.c')
-rw-r--r-- | samples/server.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/samples/server.c b/samples/server.c index dd344f9..ed11f46 100644 --- a/samples/server.c +++ b/samples/server.c @@ -421,7 +421,6 @@ int main(int argc, char *argv[]) char template[] = "/tmp/libvfio-user.XXXXXX"; int ret; bool verbose = false; - bool destination = false; int opt; struct sigaction act = {.sa_handler = _sa_handler}; const size_t bar1_size = 0x3000; @@ -440,19 +439,13 @@ int main(int argc, char *argv[]) .write_data = &migration_write_data }; - while ((opt = getopt(argc, argv, "vr")) != -1) { + while ((opt = getopt(argc, argv, "v")) != -1) { switch (opt) { case 'v': verbose = true; break; - case 'r': - destination = true; - server_data.migration.state = VFU_MIGR_STATE_RESUME; - server_data.migration.pending_bytes = - bar1_size + sizeof(time_t); - break; default: /* '?' */ - errx(EXIT_FAILURE, "Usage: %s [-v] [-r] <socketpath>", argv[0]); + errx(EXIT_FAILURE, "Usage: %s [-v] <socketpath>", argv[0]); } } @@ -530,11 +523,7 @@ int main(int argc, char *argv[]) err(EXIT_FAILURE, "failed to setup BAR1 region"); } - ret = vfu_setup_device_migration_callbacks( - vfu_ctx, - destination ? LIBVFIO_USER_MIG_FLAG_START_RESUMING : 0, - &migr_callbacks - ); + ret = vfu_setup_device_migration_callbacks(vfu_ctx, 0, &migr_callbacks); if (ret < 0) { err(EXIT_FAILURE, "failed to setup device migration"); |