On 03/10/2018 13:00, Wei Liu wrote: > On Wed, Sep 26, 2018 at 07:30:38PM +0200, Dario Faggioli wrote: >> On Fri, 2018-09-21 at 09:52 +0100, Wei Liu wrote: >>> On Fri, Sep 21, 2018 at 07:23:23AM +0200, Juergen Gross wrote: >>>> On 20/09/18 18:06, Wei Liu wrote: >>>>> >>>>> It appears that the implementation in patch 10 concatenates the >>>>> new >>>>> settings to the old ones. It is not very nice imo. >>>>> >>>>> If for the life time of the domain you set X times the same >>>>> parameter >>>>> you get a string of foo=bar1 foo=bar2 in the saved config file. >>>>> >>>>> There is probably a simple solution: make the parameter list in >>>>> IDL a >>>>> key value list. You then update the list accordingly. >>>> >>>> The problem with that approach are parameters with sub-parameters: >>>> >>>> par=sub1=no,sub2=yes >>>> par=sub2=yes >>> >>> There is another way to solve this: further parse the sub-parameters. >>> This doesn't require any parameter specific knowledge and there are >>> already functions to split strings. >>> >> I'm not sure whether we're saying the same thing or not, but can't we, >> when parameter 'foo', which has been set to 'bar1' already, is being >> set to 'bar2', search d_config.b_info.parameters for the substring >> containing 'foo=bar1', replace it with 'foo=bar2', and save d_config >> again? > > This can do, too. It is still parsing so the amount of work needed is > more or less the same to me.
No, this isn't always correct. Think of console=tty0 console=hvc0 in the linux kernel. You don't want hvc0 to replace tty0, but to have both. Juergen _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel