qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Xen-devel] [RFC PATCH V2 1/2] xen: pass kernel initrd


From: Ian Campbell
Subject: Re: [Qemu-devel] [Xen-devel] [RFC PATCH V2 1/2] xen: pass kernel initrd to qemu
Date: Mon, 16 Jun 2014 10:57:06 +0100

On Mon, 2014-06-16 at 01:14 -0600, Chun Yan Liu wrote:
> > > > > @@ -1007,9 +1030,16 @@ static void parse_config_data(const char   
> > > > *config_source,  
> > > > >    
> > > > >      switch(b_info->type) {  
> > > > >      case LIBXL_DOMAIN_TYPE_HVM:  
> > > > > -        if (!xlu_cfg_get_string (config, "kernel", &buf, 0))  
> > > > > -            fprintf(stderr, "WARNING: ignoring \"kernel\" directive 
> > > > > for  
> > HVM   
> > > > guest. "  
> > > > > -                    "Use \"firmware_override\" instead if you really 
> > > > >  
> > want a   
> > > > non-default firmware\n");  
> > > > > +        if (!xlu_cfg_get_string (config, "kernel", &buf, 0)) {  
> > > > > +            if (strstr(buf, "hvmloader"))  
> > > > > +                fprintf(stderr, "WARNING: ignoring \"kernel\" 
> > > > > directive   
> >  
> > > > for HVM guest. "  
> > > > > +                        "Use \"firmware_override\" instead if you 
> > > > > really  
> >   
> > > > want a non-default firmware\n");  
> > > >   
> > > > I think we've had this for a few releases now, I wonder if it has 
> > > > served  
> > > > its purpose? Especially since the strstr check could have false  
> > > > positives and negatives.  
> > >  
> > > I think it's mainly to handle the old config file format, like: 
> > > kernel="/usr/lib/xen/boot/hvmloader" 
> > > in fact, in most of our hvm config files, this line still exists. 
> >  
> > Hrm. I wonder if we could check for that specific string then? Perhaps 
> > also $FOODIR/.../hvmloader (where $FOODIR is whichever bit of that path 
> > comes from autoconf)? 
> 
> Or simply check basename="hvmloader".

I think that would work. Rather than writing a basename function it
might be sufficient to check that the tail of the string is/isn't
"/hvmloader".

Ian.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]