diff options
author | Jean-Philippe Brucker <jean-philippe.brucker@arm.com> | 2017-11-01 15:13:07 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-11-03 10:55:50 +0000 |
commit | 6c7239532b7db4490a1fbc67d5f288f20eac9c21 (patch) | |
tree | 18750badb147f4e9fc1b9721ce11c8bb15feea2b | |
parent | 5857730ceee5980e482807afc922e758cbeaa921 (diff) | |
download | kvmtool-6c7239532b7db4490a1fbc67d5f288f20eac9c21.tar.gz |
builtin-run: Fix console= parameter concatenation
Commit 5857730ceee5 ("builtin-run: Pass console= parameter based on
active console") adds a console parameter to the kernel command line,
but doesn't account for x86 kvm__arch_set_cmdline populating
real_cmdline without adding a space. Fix the concatenation.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | builtin-run.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-run.c b/builtin-run.c index 7f3872dd..b56aea7d 100644 --- a/builtin-run.c +++ b/builtin-run.c @@ -570,16 +570,16 @@ static struct kvm *kvm_cmd_run_init(int argc, const char **argv) kvm__arch_set_cmdline(real_cmdline, video); if (video) { - strcat(real_cmdline, "console=tty0"); + strcat(real_cmdline, " console=tty0"); } else { switch (kvm->cfg.active_console) { case CONSOLE_HV: /* Fallthrough */ case CONSOLE_VIRTIO: - strcat(real_cmdline, "console=hvc0"); + strcat(real_cmdline, " console=hvc0"); break; case CONSOLE_8250: - strcat(real_cmdline, "console=ttyS0"); + strcat(real_cmdline, " console=ttyS0"); break; } } |