diff options
author | John Levon <john.levon@nutanix.com> | 2021-05-11 11:20:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 11:20:55 +0100 |
commit | 4a9df7bea8a96c6c415077cca4f2e90fc22de3f0 (patch) | |
tree | a27ce9053823009f51513d479041229d6f309330 /samples | |
parent | 702a4cad49c40406ff498e0da4a80c6d07b4fc83 (diff) | |
download | libvfio-user-4a9df7bea8a96c6c415077cca4f2e90fc22de3f0.zip libvfio-user-4a9df7bea8a96c6c415077cca4f2e90fc22de3f0.tar.gz libvfio-user-4a9df7bea8a96c6c415077cca4f2e90fc22de3f0.tar.bz2 |
samples/server: correct double mmap() (#483)
We were accidentally mapping bar0 twice.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/server.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/samples/server.c b/samples/server.c index 1ab184e..79d645a 100644 --- a/samples/server.c +++ b/samples/server.c @@ -546,11 +546,6 @@ int main(int argc, char *argv[]) if (ftruncate(fileno(migr_fp), migr_size) == -1) { err(EXIT_FAILURE, "failed to truncate migration file"); } - server_data.bar1 = mmap(NULL, server_data.bar1_size, PROT_READ | PROT_WRITE, - MAP_SHARED, fileno(bar1_fp), 0); - if (server_data.bar1 == MAP_FAILED) { - err(EXIT_FAILURE, "failed to mmap migration file"); - } struct iovec migr_mmap_areas[] = { [0] = { .iov_base = (void *)migr_regs_size, |