diff options
author | John Levon <john.levon@nutanix.com> | 2020-11-24 09:36:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-24 09:36:50 +0000 |
commit | 3b8d4018aa01cb4896b27cff1777beec20d27096 (patch) | |
tree | 98ee679cc6e9316331fcf8213a3867363d39f399 /lib/migration.c | |
parent | 3ba6609e1b3609b0b2764c1dcbc596f071873a83 (diff) | |
download | libvfio-user-3b8d4018aa01cb4896b27cff1777beec20d27096.zip libvfio-user-3b8d4018aa01cb4896b27cff1777beec20d27096.tar.gz libvfio-user-3b8d4018aa01cb4896b27cff1777beec20d27096.tar.bz2 |
parse VFIO_USER_VERSION JSON stanza
Diffstat (limited to 'lib/migration.c')
-rw-r--r-- | lib/migration.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/migration.c b/lib/migration.c index 2e95322..4072614 100644 --- a/lib/migration.c +++ b/lib/migration.c @@ -28,12 +28,13 @@ * */ -#include <limits.h> +#include <assert.h> #include <errno.h> +#include <limits.h> #include <string.h> -#include <assert.h> #include <stdlib.h> +#include "common.h" #include "migration.h" enum migr_iter_state { @@ -465,4 +466,17 @@ migration_get_pgsize(struct migration *migr) return migr->pgsize; } +int +migration_set_pgsize(struct migration *migr, size_t pgsize) +{ + assert(migr != NULL); + + // FIXME? + if (pgsize != PAGE_SIZE) + return -EINVAL; + + migr->pgsize = pgsize; + return 0; +} + /* ex: set tabstop=4 shiftwidth=4 softtabstop=4 expandtab: */ |