From: Ian Jackson Subject: [PATCH] xl: Do not duplicate last line of compat config file Date: Tue, 2 Feb 2010 17:22:32 +0000 Message-ID: <19304.24408.555509.848452@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Ian Jackson # Date 1265125656 0 # Node ID 72c359823655427fed7418f0a1cdd39d496ec571 # Parent d0b431ede24b0428b635db40fe6177f5d9af3a7d xl: Do not duplicate last line of config file when trying compat mode. Signed-off-by: Ian Jackson diff -r d0b431ede24b -r 72c359823655 tools/libxl/xl.c --- a/tools/libxl/xl.c Mon Feb 01 14:03:47 2010 +0000 +++ b/tools/libxl/xl.c Tue Feb 02 15:47:36 2010 +0000 @@ -344,6 +344,7 @@ } while (!feof(s)) { + buf[0] = 0; fgets(buf, size, s); while (buf[strlen(buf) - 1] != '\n' && !feof(s)) { size += 1024;