Skip to contentSkip to conversation

kvm tools: Add missing space after kernel params

PATCH New Sasha Levin 1 participant 1 message May 8, 2011 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm tools: Add missing space after kernel params

Add missing space so that user-provided kernel params will be properly concatenated to default params.

Instead of just adding a space at the end, add it with a separate strcat(), since it's not the first (and wouldn't have been the last) time a space wasn't added.

---
 tools/kvm/kvm-run.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
tools/kvm/kvm-run.c +1 -0
index 58e2977..d8ef4c9 100644
@@ -424,6 +424,7 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix)
 
 	memset(real_cmdline, 0, sizeof(real_cmdline));
 	strcpy(real_cmdline, "notsc noapic noacpi pci=conf1 console=ttyS0 earlyprintk=serial");
+	strcat(real_cmdline, " ");
 	if (kernel_cmdline)
 		strlcat(real_cmdline, kernel_cmdline, sizeof(real_cmdline));
 
Signature · 1 line
1.7.5.rc3