From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [PATCH] When dumping from file system show results in sane order Date: Tue, 12 Oct 2010 10:55:46 +1100 Message-ID: <20101011235546.GB22383@yookeroo> References: <1286305641-23388-1-git-send-email-msm@freescale.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1286305641-23388-1-git-send-email-msm-KZfg59tc24xl57MIdRCFDg@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Matthew McClintock Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: devicetree@vger.kernel.org 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. 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. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson