From: Masahiro Yamada <masahiroy@kernel.org>
To: initramfs-tools@packages.debian.org
Cc: debian-kernel@lists.debian.org, initramfs@vger.kernel.org,
Ben Hutchings <benh@debian.org>,
Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH] hook-functions: dep_add_modules_mount: kill unreadable eval
Date: Mon, 23 Jan 2023 13:55:23 +0900 [thread overview]
Message-ID: <20230123045523.697916-1-masahiroy@kernel.org> (raw)
The 'eval' is here because we evaluated the code returned by AWK.
Commit 9249db649ced ("MODULES=dep: awk free version for root dev search")
stopped using AWK, so 'eval' is unneeded.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
hook-functions | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hook-functions b/hook-functions
index 95bd584..fa49990 100644
--- a/hook-functions
+++ b/hook-functions
@@ -416,10 +416,13 @@ dep_add_modules_mount()
# find out block device + fstype
# shellcheck disable=SC2034
- eval "$(while read -r dev mp fs opts rest ; do \
- [ "$mp" = "$dir" ] && [ "$fs" != "rootfs" ] \
- && printf "dev_node=%s\\nFSTYPE=%s" "$dev" "$fs"\
- && break; done < /proc/mounts)"
+ while read -r dev mp fs opts rest; do \
+ if [ "$mp" = "$dir" ] && [ "$fs" != "rootfs" ]; then
+ dev_node=$dev
+ FSTYPE=$fs
+ break;
+ fi
+ done < /proc/mounts
# Only the root mountpoint has to exist; do nothing if any other
# directory is not a mountpoint.
reply other threads:[~2023-01-23 4:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230123045523.697916-1-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=benh@debian.org \
--cc=debian-kernel@lists.debian.org \
--cc=initramfs-tools@packages.debian.org \
--cc=initramfs@vger.kernel.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