diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-12-17 06:27:57 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-12-17 06:27:57 +0000 |
commit | 57ea955dd313ed5a93c5092dc4a9b22dfcb01949 (patch) | |
tree | 047423c7b15849caea6aa3035e780f151527bda1 /tools/blktap2 | |
parent | ab562bd46c7041d82523322dde38d42494fb37ca (diff) | |
download | xen-57ea955dd313ed5a93c5092dc4a9b22dfcb01949.tar.gz xen-57ea955dd313ed5a93c5092dc4a9b22dfcb01949.tar.bz2 xen-57ea955dd313ed5a93c5092dc4a9b22dfcb01949.zip |
Adds 'memory_sharing' option to domain config scripts. It passes domain id to
the tapdisk2 process if sharing is enabled (tapdisk2 is not normally aware what
domain it is working for).
Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
Diffstat (limited to 'tools/blktap2')
-rw-r--r-- | tools/blktap2/drivers/tapdisk2.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/blktap2/drivers/tapdisk2.c b/tools/blktap2/drivers/tapdisk2.c index 015e8a3921..a7d4dfb4c2 100644 --- a/tools/blktap2/drivers/tapdisk2.c +++ b/tools/blktap2/drivers/tapdisk2.c @@ -34,6 +34,7 @@ #include <sys/stat.h> #include <sys/types.h> #include <sys/ioctl.h> +#include <memshr.h> #include "tapdisk.h" #include "blktap2.h" @@ -411,13 +412,17 @@ main(int argc, char *argv[]) params = NULL; - while ((c = getopt(argc, argv, "n:h")) != -1) { + while ((c = getopt(argc, argv, "n:s:h")) != -1) { switch (c) { case 'n': params = optarg; break; case 'h': usage(argv[0], 0); + break; + case 's': + memshr_set_domid(atoi(optarg)); + break; default: usage(argv[0], EINVAL); } |