[Pkg-libvirt-commits] [libguestfs] 01/36: p2v: Chomp kernel command line (RHBZ#1229340).

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:13:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag upstream/1.29.47
in repository libguestfs.

commit 6114c10df05cdb1662ac22930010fd45714f9c40
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
---
 p2v/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/p2v/main.c b/p2v/main.c
index 1f8370b..d322c79 100644
--- a/p2v/main.c
+++ b/p2v/main.c
@@ -534,6 +534,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