[Pkg-libvirt-commits] [libguestfs] 14/26: p2v: Chomp kernel command line (RHBZ#1229340).
Hilko Bengen
bengen at moszumanska.debian.org
Sun Nov 1 17:11:26 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag upstream/1.28.12
in repository libguestfs.
commit 91deb267a157ce344ce6b3c3b694be600ef8c896
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Jun 8 14:40:20 2015 +0100
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:
https://github.com/libguestfs/supermin/commit/4819655b3c96e836e46d0d679f84b10f8e9abcf5
(cherry picked from commit 6114c10df05cdb1662ac22930010fd45714f9c40)
---
p2v/main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/p2v/main.c b/p2v/main.c
index 853af11..2ecc443 100644
--- a/p2v/main.c
+++ b/p2v/main.c
@@ -517,6 +517,9 @@ read_cmdline (void)
return NULL;
}
+ if (len >= 1 && ret[len-1] == '\n')
+ ret[len-1] = '\0';
+
return ret;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list