Commit-ID: b67f4a10be7979f1170eafb4bc437e803210f6a3 Gitweb: http://git.kernel.org/tip/b67f4a10be7979f1170eafb4bc437e803210f6a3 Author: Lai Jiangshan <laijs@xxxxxxxxxxxxxx> AuthorDate: Fri, 16 Dec 2011 17:12:03 +0800 Committer: Pekka Enberg <penberg@xxxxxxxxxx> CommitDate: Sat, 17 Dec 2011 09:36:03 +0200 kvm-tools: only one rootfs directory atmost It makes no sense when we use several rootfs directories. Only the last one works. Acked-by: Sasha Levin <levinsasha928@xxxxxxxxx> Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx> --- tools/kvm/builtin-run.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index d1b6d42..4d3f5ec 100644 --- a/tools/kvm/builtin-run.c +++ b/tools/kvm/builtin-run.c @@ -132,6 +132,9 @@ static int img_name_parser(const struct option *opt, const char *arg, int unset) S_ISDIR(st.st_mode)) { char tmp[PATH_MAX]; + if (using_rootfs) + die("Please use only one rootfs directory atmost"); + if (realpath(arg, tmp) == 0 || virtio_9p__register(kvm, tmp, "/dev/root") < 0) die("Unable to initialize virtio 9p"); @@ -145,6 +148,9 @@ static int img_name_parser(const struct option *opt, const char *arg, int unset) S_ISDIR(st.st_mode)) { char tmp[PATH_MAX]; + if (using_rootfs) + die("Please use only one rootfs directory atmost"); + if (realpath(path, tmp) == 0 || virtio_9p__register(kvm, tmp, "/dev/root") < 0) die("Unable to initialize virtio 9p"); -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html