[PATCH] When dumping from file system show results in sane order

Matthew McClintock msm at freescale.com
Tue Oct 12 11:41:50 EST 2010


On Tue, 2010-10-12 at 10:55 +1100, David Gibson wrote:
> On Tue, Oct 05, 2010 at 02:07:21PM -0500, Matthew McClintock wrote:
> > Currently, when we run the following
> > 
> > $> dtc -I fs -O dts /proc/device-tree
> > 
> > We get the output in a "reverse order", this patch will reverse that
> > output order and should resemble your initial device more closely
> 
> Reverse order from what?  Directory entries are unordered for most
> intents and purposes - there's no guarantee that readdir() will return
> entries in a consistent order, and behaviour in practice will vary
> from one filesystem to another.

Ok, maybe I should word it as now ordered. =)

> 
> Your patch doesn't reverse the order - it sorts the items.  If that's
> what you actually want, then my general dtdiff and sorting patch will
> serve you better, as Grant suggests.
> 

Yep, I concur your version is better and I would like to see that
accepted for my own reasons.

Cheers,
Matthew




More information about the devicetree-discuss mailing list