From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Alexander Tsoy <alexander-EP/B3+myoZc@public.gmane.org>,
initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] resume/module-setup.sh: filter out empty resume= options in cmdline()
Date: Tue, 20 May 2014 13:30:19 +0200 [thread overview]
Message-ID: <537B3CCB.70909@redhat.com> (raw)
In-Reply-To: <E1WlLlY-0007GR-QD-C3g8GgeTu50ox3rIn2DAYQ@public.gmane.org>
On 16.05.2014 19:12, Alexander Tsoy wrote:
> cmdline() prints empty "resume=" options for non-persistent swap
> devices, for example zram. Add a check for that.
>
> This patch also fixes printf formatting and removes unused variables.
> ---
> modules.d/95resume/module-setup.sh | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh
> index ceb7855..b1b4684 100755
> --- a/modules.d/95resume/module-setup.sh
> +++ b/modules.d/95resume/module-setup.sh
> @@ -17,12 +17,12 @@ check() {
>
> # called by dracut
> cmdline() {
> - local _activated
> - declare -A _activated
> + local _resume
>
> for dev in "${!host_fs_types[@]}"; do
> [[ ${host_fs_types[$dev]} =~ ^(swap|swsuspend|swsupend)$ ]] || continue
> - printf "resume=%s " "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
> + _resume=$(shorten_persistent_dev "$(get_persistent_dev "$dev")")
> + [[ -n ${_resume} ]] && printf " resume=%s" "${_resume}"
> done
> }
>
>
thanks!
http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=c4b529f50388474ceffa8c918d2722fc777eac0a
prev parent reply other threads:[~2014-05-20 11:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 17:12 [PATCH] resume/module-setup.sh: filter out empty resume= options in cmdline() Alexander Tsoy
[not found] ` <E1WlLlY-0007GR-QD-C3g8GgeTu50ox3rIn2DAYQ@public.gmane.org>
2014-05-20 11:30 ` 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=537B3CCB.70909@redhat.com \
--to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=alexander-EP/B3+myoZc@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.