mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Michal Soltys <soltys-R61QfzASbfY@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] str_replace() fix
Date: Thu, 22 Sep 2011 15:46:39 +0200	[thread overview]
Message-ID: <4E7B3C3F.7050302@redhat.com> (raw)
In-Reply-To: <1316069157-3063-1-git-send-email-soltys-R61QfzASbfY@public.gmane.org>

On 15.09.2011 08:45, Michal Soltys wrote:
> Whitespace removal in:
> 
> 	out="${out}${chop# }$r"
> 
> will damage certain strings, for example the following call:
> 
> 	str_replace ' aax aaxaa' x y
> 
> would return 'aayaayaa' instead of ' aay aayaa'.
> 
> Signed-off-by: Michal Soltys <soltys-R61QfzASbfY@public.gmane.org>
> ---
>  modules.d/99base/dracut-lib.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
> index 50b1ed2..62c3bf5 100755
> --- a/modules.d/99base/dracut-lib.sh
> +++ b/modules.d/99base/dracut-lib.sh
> @@ -24,7 +24,7 @@ str_replace() {
>  
>      while strstr "${in}" "$s"; do
>          chop="${in%%$s*}"
> -        out="${out}${chop# }$r"
> +        out="${out}${chop}$r"
>          in="${in#*$s}"
>      done
>      echo "${out}${in}"

pushed to temporary git: http://git.surfsite.org/dracut.git

      parent reply	other threads:[~2011-09-22 13:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15  6:45 [PATCH] str_replace() fix Michal Soltys
     [not found] ` <1316069157-3063-1-git-send-email-soltys-R61QfzASbfY@public.gmane.org>
2011-09-22 13:46   ` Harald Hoyer [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=4E7B3C3F.7050302@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=soltys-R61QfzASbfY@public.gmane.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