p2v: Chomp kernel command line (RHBZ#1229340).

When using the kernel command line to configure virt-p2v, if any p2v.*
parameter appeared right at the end of the kernel command line, then a
bogus \n would be appended.  Remove this.

This is essentially the same fix as:
4819655b3c
This commit is contained in:
Richard W.M. Jones
2015-06-08 14:40:20 +01:00
parent 9b9be6d1c6
commit 6114c10df0

View File

@@ -534,6 +534,9 @@ read_cmdline (void)
return NULL;
}
if (len >= 1 && ret[len-1] == '\n')
ret[len-1] = '\0';
return ret;
}