From nobody Mon Sep 15 12:57:16 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78D61C54EBC for ; Thu, 12 Jan 2023 11:55:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232854AbjALLzO (ORCPT ); Thu, 12 Jan 2023 06:55:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232039AbjALLya (ORCPT ); Thu, 12 Jan 2023 06:54:30 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B4B04F11B for ; Thu, 12 Jan 2023 03:44:11 -0800 (PST) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9BBD53F068; Thu, 12 Jan 2023 11:44:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1673523849; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=BG+fHBqxWABJrZCJncRSe6CbRjngbYvlt+A/PF25LZk=; b=kWLGTEjxSQk3Cb2StwWbZFlOWF+YA0LqlBFUAyBw6edbcWEylnNhi9wRjxg8rClMbpA5qa AOYhzkfoqqPp9f1L2jnxxB04530FWTyip9X0augMuZ3x2cON1tmyHUkamLOkQdlNio3YaD uaL2HLvW4kJXyykD1dXM0uBYY4+YR6g= Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 40989136AE; Thu, 12 Jan 2023 11:44:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id nGcODInyv2MyTgAAGKfGzw (envelope-from ); Thu, 12 Jan 2023 11:44:09 +0000 From: Antonio Alvarez Feijoo To: Masami Hiramatsu , linux-kernel@vger.kernel.org Cc: Antonio Alvarez Feijoo Subject: [PATCH] tools/bootconfig: fix single & used for logical condition Date: Thu, 12 Jan 2023 12:42:15 +0100 Message-Id: <20230112114215.17103-1-antonio.feijoo@suse.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Acked-by: Masami Hiramatsu (Google) --- tools/bootconfig/scripts/ftrace2bconf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bootconfig/scripts/ftrace2bconf.sh b/tools/bootconfig/sc= ripts/ftrace2bconf.sh index 6183b36c6846..1603801cf126 100755 --- a/tools/bootconfig/scripts/ftrace2bconf.sh +++ b/tools/bootconfig/scripts/ftrace2bconf.sh @@ -93,7 +93,7 @@ referred_vars() { } =20 event_is_enabled() { # enable-file - test -f $1 & grep -q "1" $1 + test -f $1 && grep -q "1" $1 } =20 per_event_options() { # event-dir --=20 2.35.3