[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/4] dt-uart: support /chosen/stdout-path property.



On 07/01/15 16:47, Ian Campbell wrote:
> 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.

Sounds good.

Regards,

-- 
Julien Grall

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.