From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
To: Masami Hiramatsu <mhiramat@kernel.org>, linux-kernel@vger.kernel.org
Cc: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Subject: [PATCH] tools/bootconfig: fix single & used for logical condition
Date: Thu, 12 Jan 2023 12:42:15 +0100 [thread overview]
Message-ID: <20230112114215.17103-1-antonio.feijoo@suse.com> (raw)
A single & will create a background process and return true, so the grep
command will run even if the file checked in the first condition does not
exist.
Signed-off-by: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
---
tools/bootconfig/scripts/ftrace2bconf.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bootconfig/scripts/ftrace2bconf.sh b/tools/bootconfig/scripts/ftrace2bconf.sh
index 6183b36c6846..1603801cf126 100755
--- a/tools/bootconfig/scripts/ftrace2bconf.sh
+++ b/tools/bootconfig/scripts/ftrace2bconf.sh
@@ -93,7 +93,7 @@ referred_vars() {
}
event_is_enabled() { # enable-file
- test -f $1 & grep -q "1" $1
+ test -f $1 && grep -q "1" $1
}
per_event_options() { # event-dir
--
2.35.3
next reply other threads:[~2023-01-12 11:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 11:42 Antonio Alvarez Feijoo [this message]
2023-01-19 22:49 ` Masami Hiramatsu
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=20230112114215.17103-1-antonio.feijoo@suse.com \
--to=antonio.feijoo@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@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
all inboxes | Powered by JetHome®