Skip to content

Commit cf8c59a

Browse files
aafeijoo-susemhiramat
authored andcommitted
tools/bootconfig: fix single & used for logical condition
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. Link: https://lore.kernel.org/all/[email protected]/ Fixes: 1eaad3a ("tools/bootconfig: Use per-group/all enable option in ftrace2bconf script") Signed-off-by: Antonio Alvarez Feijoo <[email protected]> Cc: [email protected] Acked-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
1 parent c9c3395 commit cf8c59a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/bootconfig/scripts/ftrace2bconf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ referred_vars() {
9393
}
9494

9595
event_is_enabled() { # enable-file
96-
test -f $1 & grep -q "1" $1
96+
test -f $1 && grep -q "1" $1
9797
}
9898

9999
per_event_options() { # event-dir

0 commit comments

Comments
 (0)