On Thu, 2015-08-13 at 08:48 +0200, Richard Cochran wrote:
> On Thu, Aug 13, 2015 at 08:20:51AM +0200, Richard Cochran wrote:
> > The only built in assumption is that every option can appear under
> > [global] as a default. It does *not* support options that can only
> > appear in a non-global section.
>
> No, I am mistaken. The new code doesn't support overriding arbitrary
> global options in a section. This won't work in general:
>
I am not sure we really need this.
> [global]
> someOption 1
>
> [phc2sys]
> someOption 2
>
> That only works if "someOption" is marked as port-specific item.
> However, this can be done later on. Something like this:
>
> enum config_section {
> GLOBAL_SECTION,
> PORT_SECTION,
> + PROGRAM_SECTION,
> UNKNOWN_SECTION,
> };
>
> #define CFG_ITEM_STATIC (1 << 0) /* statically allocated, not
> to be freed */
> #define CFG_ITEM_LOCKED (1 << 1) /* command line value, may not
> be changed */
> #define CFG_ITEM_PORT (1 << 2) /* item may appear in port
> sections */
> + #define CFG_ITEM_PROG (1 << 3) /* default may be overriden
> in a program section */
>
> The parse_item() code would have to change. But that will be easier
> to do, once all of the manual parsing in parse_port_setting() and
> parse_global_setting() is gone.
>
> Whether we implement this or not depends on whether we want a
> single configuration file for all three programs or whether we just
> say, each program must have its own file.
>
I think we can work on this when/if we decide programs need it.
Regards,
Jake
> Thanks,
> Richard
>
------------------------------------------------------------------------------
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel