diff options
author | Oleg Nesterov <oleg@redhat.com> | 2015-10-22 17:59:42 +0200 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-10-27 17:06:49 +0000 |
commit | 1c2a21f054060228e42cdc935275cdd57ca37709 (patch) | |
tree | dc54deeb4e7e6f03d1e5d5525a41640d25c17c5a | |
parent | f8a7e35cbb1613bfe1d4b322cf40405e18bd960e (diff) | |
download | kvmtool-1c2a21f054060228e42cdc935275cdd57ca37709.tar.gz |
kvmtool/run: don't abuse "root=" parameter, don't pass "rw" to v9fs_mount()
1. kvm_cmd_run_init() appends "root=/dev/root" to real_cmdline if
cfg.using_rootfs == T. This doesn't hurt but makes no sense and
looks confusing.
We do not need to initialiaze the kernel's saved_root_name[] and
"/dev/root" means nothing to name_to_dev_t().
We only need to pass this mount-tag to 9p but the kernel always
uses dev_name="/dev/root" in mount_root() path, so we can safely
remove this option from the command line.
2. "rw" in rootflags looks confusing too, it is silently ignored by
v9fs_parse_options() and has no effect.
We need to clear MS_RDONLY from root_mountflags, this is what the
"standalone" kernel parameter correctly does.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | builtin-run.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-run.c b/builtin-run.c index ab1fc2ad..6e4491c6 100644 --- a/builtin-run.c +++ b/builtin-run.c @@ -590,7 +590,7 @@ static struct kvm *kvm_cmd_run_init(int argc, const char **argv) } if (kvm->cfg.using_rootfs) { - strcat(real_cmdline, " root=/dev/root rw rootflags=rw,trans=virtio,version=9p2000.L rootfstype=9p"); + strcat(real_cmdline, " rw rootflags=trans=virtio,version=9p2000.L rootfstype=9p"); if (kvm->cfg.custom_rootfs) { kvm_run_set_sandbox(kvm); |