[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH LIBVIRT] libxl: Support cmdline= in xl config files



On Tue, 2016-01-19 at 21:46 -0700, Jim Fehlig wrote:
> On 01/19/2016 05:03 AM, Ian Campbell wrote:
> > I went to ping this but noticed that I had sent it to "jimfehlig" (i.e.
> > no
> > domain), so no wonder there was no reply!
> > 
> > To: line fixed here, let me know if you would prefer a resend.
> 
> That would be much appreciated, thanks!
> 
> > 
> > Ian.
> > 
> > On Wed, 2015-12-16 at 12:09 +0000, Ian Campbell wrote:
> > > ... and consolidate the cmdline/extra/root parsing to facilitate
> > > doing
> > > so.
> > > 
> > > The logic is the same as xl's parse_cmdline from the current xen.git
> > > master
> > > branch (e6f0e099d2c17de47fd86e817b1998db903cab61), except I was
> > > unable
> > > to figure out how/where to route the warning about ignoring
> > > root+extra if cmdline was specified.
> 
> I think VIR_WARN() would be appropriate.

Ok, will do, thanks.

> > > 
> > > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > > ---
> > > Âsrc/xenconfig/xen_xl.c | 62 ++++++++++++++++++++++++++++++--------
> > > ----
> > > --------
> > > Â1 file changed, 37 insertions(+), 25 deletions(-)
> > > 
> > > diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c
> > > index 91cdff6..ba8b938 100644
> > > --- a/src/xenconfig/xen_xl.c
> > > +++ b/src/xenconfig/xen_xl.c
> > > @@ -58,11 +58,45 @@ extern int xlu_disk_parse(XLU_Config *cfg,
> > > ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlibxl_device_disk *disk);
> > > Â#endif
> > > Â
> > > +static int xenParseCmdline(virConfPtr conf, char **r_cmdline)
> > > +{
> > > +ÂÂÂÂchar *cmdline = NULL;
> > > +ÂÂÂÂconst char *root = NULL, *extra = NULL, *buf = NULL;
> 
> In theory, these three don't need to be initialized since
> xenConfigGetString
> will do that. But in practice, I worry that Coverity might complain :-/.

It looks like some of the callers of xenConfigGetString initialise the
value to NULL, while others don't. I can't see any public libvirt scan
results to look if some of the ones which don't have been picked up or not.

I've just noticed also that the code I am moving/removing didn't initialise
to NULL, so I think I'll remove these initialisers.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.