[Skiboot] [PATCH] arch_flash_arm: Don't assume mtd labels are short

Joel Stanley joel at jms.id.au
Thu Nov 17 12:37:04 AEDT 2016


On Thu, Nov 17, 2016 at 11:19 AM, Patrick Williams <patrick at stwcx.xyz> wrote:
>> diff --git a/external/common/arch_flash_arm.c b/external/common/arch_flash_arm.c
>> index bb8800ff556d..3cdd41ded0a9 100644
>> --- a/external/common/arch_flash_arm.c
>> +++ b/external/common/arch_flash_arm.c
>> @@ -241,7 +241,7 @@ static char *get_dev_mtd(enum flash_access access)
>> {
>>    FILE *f;
>>    char *ret = NULL, *pos = NULL;
>> -    char line[50];
>> +    char line[255];
>
> Isn't there a max path length define in a system header we could use instead?

This isn't a path. I just chose 255 as a nice round number :)

There's no good indication of what the length will be. However, I
don't expect it to change in the future, so 255 should be plenty.

Cheers,

Joel


More information about the Skiboot mailing list