On Wed, 2015-01-07 at 16:42 +0000, Julien Grall wrote:
> > +
> > +        if ( chosen )
> > +        {
> > +            ret = dt_property_read_string(chosen, "stdout-path", &stdout);
> > +            if ( ret >= 0 )
> > +            {
> > +                printk("Taking dtuart configuration from 
> > /chosen/stdout-path\n");
> > +                strlcpy(opt_dtuart, stdout, sizeof(opt_dtuart));
> 
> The final string in opt_dtuart may be truncated if stdout is bigger than
> 255 characters.
> 
> I would add a check to avoid hours of debugging later.

Good point. I suppose it may as well warn and continue: hypothetically
the truncation might only affect some non-critical options so the
console might actually work, so we might as well try.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to