mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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:
@@ -534,6 +534,9 @@ read_cmdline (void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (len >= 1 && ret[len-1] == '\n')
|
||||
ret[len-1] = '\0';
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user