[PATCH] mtd-utils: formatting of odd-sized OOB in nanddump

Artem Bityutskiy dedekind1 at gmail.com
Thu Jul 8 00:09:29 EDT 2010


Hi,

On Wed, 2010-07-07 at 11:21 -0700, Brian Norris wrote:
> > Why 10 bytes, why not 12 or 14?
> 
> As of now, the only OOB-size that's not a multiple of 16 supported in 
> the other bits of ugly code is 218-bytes.
> 
> 218 % 16 = 10
> 
> What's the point of checking for a "supported" page-size/OOB-size 
> earlier if we're not gonna use that info? :)

No point, as well as not much point introducing magic hard-coded
constant like 10 - the printing should be generic.
> 
> > I think it is better to just copy-paste-modify the kernel
> > print_hex_dump() and utilize it, instead of this ugly crocodile code ...
> 
> I'm looking at that, since it seems a better solution. Does anyone 
> oppose including ASCII output in the "pretty" option? It's built in to 
> the print_hex_dump() already, so it shouldn't be too difficult to adapt. 
> Anyway, it seems that someone intended to print ASCII at some point 
> (nanddump.c, line 77):
> 
> static bool             pretty_print = false;   // print nice in ascii

Well, it is better to make this configurable or not print ASCII, IMO,
because it potentially may break scripts which use nanddump.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list