On Sun, 2015-01-11 at 12:06 +0100, Richard Cochran wrote:
> On Fri, Jan 09, 2015 at 04:16:32PM -0800, Jacob Keller wrote:
> > +static const char *all_global_options[] = {
> > +   "delayAsymmetry",
> > +   "logAnnounceInterval",
> > +   "logSyncInterval",
> 
> ...
> 
> > +   NULL,
> > +};
> > +
> > +/* used by phc2sys to ignore global options meant strictly for ptp4l */
> > +enum parser_result parse_known_global_options(const char *option)
> > +{
> > +   const char **item = &all_global_options[0];
> > +
> > +   while (*item != NULL) {
> > +           if (!strcmp(option, *item))
> > +                   return PARSED_OK;
> > +
> > +           item++;
> > +   }
> > +
> > +   /* we didn't find option in the list */
> > +   return NOT_PARSED;
> > +}
> 
> So keeping lists of strings to ignore seems gross to me.  It really
> points to the fact that the config code needs some TLC.  For example,
> if we had the "struct config_item", then this could be implemented in
> a straightforward, unified way, as a field in the struct.
> 
> Thanks,
> Richard

This was just the most straight forward way, however....

Agreed, your outline of design seems a lot more straight forward, and
would resolve most of the ugly that is in this series (or pre-existing).

Regards,
Jake
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
www.gigenet.com
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to