[PATCH 24/27] ubifs: ubifs_dump: dump index area

Dongsheng Yang yangds.fnst at cn.fujitsu.com
Wed Sep 23 23:32:44 PDT 2015


On 09/24/2015 02:25 PM, Richard Weinberger wrote:
> Yang,
>
> while porting my tool to your patches I've spotted this:
>
> Am 19.08.2015 um 10:39 schrieb Dongsheng Yang:
>> +static int dump_zbr(struct ubifs_info *c, struct ubifs_zbranch *zbr)
>
> [...]
>
>> +
>> +	if (le32_to_cpu(((struct ubifs_ch *)buf)->node_type) != UBIFS_IDX_NODE)
>
> ->node_type is u8 not le32.
>
>> +		goto out;
>> +
>> +	idx = ((struct ubifs_idx_node *)buf);
>> +	for (i = 0; i < le32_to_cpu(idx->child_cnt); i++) {
>
> ->child_cnt is le16 not le32.
>
>> +		struct ubifs_branch *br;
>> +		struct ubifs_zbranch child;
>
> Please double check also other places where access on-disk data
> to use the correct width.

Oh, yes. Will update it soon.

Yang
>
> Thanks,
> //richard
> .
>




More information about the linux-mtd mailing list