[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxlu: Handle += in config files
On Tue, Aug 13, 2019 at 04:06:33PM +0100, Andrew Cooper wrote: > On 13/08/2019 15:48, Anthony PERARD wrote: > > Handle += of both strings and lists. > > > > If += is used for config options expected to be numbers, then a > > warning is printed and the config option ignored (because xl ignores > > config options with errors). > > > > This is to be used for development purposes, where modifying config > > option can be done on the `xl create' command line. > > > > One could have a cmdline= in the cfg file, and specify cmdline+= on > > the `xl create` command line without the need to write the whole > > cmdline in `xl' command line but simply append to the one in the cfg file. > > Or add an extra vif or disk by simply having "vif += [ '', ];" in the > > `xl' cmdline. > > > > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> > > --- > > > > Notes: > > Commiter, the libxlu_cfg_?.[hc] files needs to be regenerated. (with > > make) > > > > This is a different proposal to Andrew's patch: > > <20190805144910.20223-1-andrew.cooper3@xxxxxxxxxx> > > [PATCH] tools/xl: Make extra= usable in combination with cmdline= > > I gave this a spin, but got: > > [root@fusebot ~]# ./xlplus create shim.cfg > ramdisk=\"/root/tests/selftest/test-hvm64-selftest\" > cmdline+=\"dom0=pvh\ dom0-iommu=none\" > Parsing config from shim.cfg > shim.cfg:19: config parsing error near `+="dom0=pvh': lexical error > warning: Config file looks like it contains Python code. > warning: Arbitrary Python is no longer supported. > warning: See http://wiki.xen.org/wiki/PythonInXlConfig > Failed to parse config: Invalid argument Either older version of `flex' behave differently, or you don't have it installed on your system. `make' seems to only print a warning if `flex' is missing. Also, I've only done concatenation of string, += doesn't add a ' ' in between. So for cmdline, it would needs to be cmdline+=\"\ dom0=pvh\". Thanks, -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |