Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Curt Brune <curt@cumulusnetworks.com>
Cc: kexec@lists.infradead.org
Subject: Re: [PATCH 1/1] Improve device tree directory sorting
Date: Thu, 26 Nov 2015 11:16:14 +0900	[thread overview]
Message-ID: <20151126021614.GA30297@verge.net.au> (raw)
In-Reply-To: <1448417830-48786-2-git-send-email-curt@cumulusnetworks.com>

On Tue, Nov 24, 2015 at 06:17:10PM -0800, Curt Brune wrote:
> Previously when sorting the device tree directory entries, if both
> device tree entries contained the '@' character then comparison was
> made based on the length of the strings.
> 
> This did not work in all cases and could result in odd orderings.
> 
> This patch modifies the comparison function for the case when both
> strings contain the '@' character.
> 
> First a lexical comparison is made between the prefix portions of the
> strings *before* the '@' character.
> 
> Next, if the prefixes are equal, the lengths of the suffixes *after*
> the '@' character are compared.  This preserves the intent of the
> original code.
> 
> Next, if the suffix lengths are equal, a lexical comparison of the
> suffixes is made.
> 
> This is still not strictly correct, as ideally the portion after the
> '@' should be compared numerically.  However, determining what base to
> use for all case is difficult.
> 
> Signed-off-by: Curt Brune <curt@cumulusnetworks.com>

Thanks, applied.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

      reply	other threads:[~2015-11-26  2:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25  2:17 [PATCH 1/1] Improve device tree directory sorting Curt Brune
2015-11-26  2:16 ` Simon Horman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151126021614.GA30297@verge.net.au \
    --to=horms@verge.net.au \
    --cc=curt@cumulusnetworks.com \
    --cc=kexec@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox