From: Ian Jackson Subject: Re: [PATCH] libxl: Tolerate xl config files missing trailing newline Date: Tue, 11 Sep 2012 15:39:40 +0100 Message-ID: <20559.19756.993187.326445@mariner.uk.xensource.com> References: <20559.18783.257111.373451@mariner.uk.xensource.com> <1347373862.5305.176.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1347373862.5305.176.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Jan Beulich , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [PATCH] libxl: Tolerate xl config files missing trailing newline"): > BTW, does this correctly handle the way extra args are pinned onto the > end in create in xl (I mean the stuff which comes from the cmdline which > are glommed onto the end of the config file internally). Yes. The code there does this: config_len += sprintf(config_data + config_len, "\n%s\n", extra_config); So the actual config file gets a newline appended before the additional parameters. If you use this feature then the "Tolerate xl config files missing trailing newline" patch is not needed. > On Tue, 2012-09-11 at 15:23 +0100, Ian Jackson wrote: > > Should this go into 4.2.0 or be held for 4.2.1 (or is it not 4.2.x > > material at all) ? > > 4.2.1 IMHO, the workaround for 4.2.0 is obvious enough, I think. > Fair enough. > On a related note Bastian complained a while ago that the line numbers > reported on syntax error were bogus/meaningless (and a little confusing) > for parameters from the command line -- can you think of a way to fix > that (for 4.3 of course). I was thinking along the lines of supporting > and injecting a "#pragma everything-from-here-from-the-command-line", > but maybe you have a better idea, like iterative parsing of multiple > inputs. Iterative parsing of multiple inputs is the correct answer. Ian.