[syslinux] Error checking code WAS: extlinux 6.03 serial console not responding to input

Ady ady-sf at hotmail.com
Wed May 20 09:14:59 PDT 2015


> On Wed, May 20, 2015 at 07:58:37AM -0700, Patrick Masotta wrote:
> > >>>
> >  I don't think it's quite so complicated.  I haven't reviewed the entire
> >  function, but consider this simple patch to the section that handles
> >  the "serial" command:
> > <<<
> >  
> > It is not individually complicated (I agree) but there are "many" different variables in the 
> > configuration file; your patch only considers the serial command receiving a decimal integer;
> > But how about checking i.e. something like:
> > 
> > menu color title   1;37;44     #FFFFFFFF *
> > menu color border  37;44       #80FFFFFF #00000000 none
> > menu color sel     *           #FFFFFFFF #76A1D0FF *
> > menu color hotsel  1;7;37;40   #FFFFFFFF #76A1D0FF *
> > 
> > can you imagine parsings something like that using your approach? 
> > a coder's nightmare...
> 
> I'm not sure what to say about that.  My point is that each individual command
> should check for errors in its arguments.  The code is obviously already
> present to parse these directives.  The nightmare is that there's no error
> checking anywhere!  Perhaps it can't be fixed all at once, but the first step
> is to provide a facility for reporting errors.  Then the error checks could be
> added incrementally over time.  I agree that it's more difficult to write
> software that checks for errors, but nobody said it should be easy.
> 
> Regards,
> Andy
 
Please allow me to disagree, in this context.

One advantage of Syslinux is the simple plain text configuration. I'd 
rather see users writing adequate directives instead of "helping" them 
from inside the code. Resources are not abundant (at all) in The 
Syslinux Project.

Additionally, we all know that every (new) "feature" has a "cost", such 
as a more complex code, which eventually makes its later improvement 
more difficult.

In the particular case of the non-decimal values in the SERIAL 
directive, this is a regression bug, even with users writing adequate 
configuration directives. What would be the next step? Writing code in 
Syslinux so to avoid (or sometimes hide) bugs in the source code? I'd 
rather see bugs squashed, and actual features improved (I have been 
waiting for some of them for several years, and I'm still waiting). 
Development is already very scarce, comatose.

I wish every meaningful error would provide clear feedback. Hey, if we 
are at it, since I cannot expect zero errors (from users), let's wish 
any error would be automatically and silently corrected by the code 
(reading and interpreting thoughts and intentions would be a nice 
feature request :P).

But I don't want to sound (nor be) pessimist. Any contributions 
(testing, feedback, documentation, patches...) are welcome, and if they 
help solve frequent problems or improve on popular requests, even 
better.

Let's hope an adequate patch for the SERIAL directive will be merged 
sooner rather than later.

Regards,
Ady.
 
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> 





More information about the Syslinux mailing list