Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nNb6d-0007Fm-1r for mharc-grub-devel@gnu.org; Fri, 25 Feb 2022 08:57:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNb68-0007Bz-NS for grub-devel@gnu.org; Fri, 25 Feb 2022 08:57:28 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:25206) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNb64-00059t-LJ for grub-devel@gnu.org; Fri, 25 Feb 2022 08:57:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645797443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ukxvDhQHQU5ZMlPHfwxc9mo55NDeLPrYW0hNKjPOnN0=; b=hhxgoA0/ihdlq1aTr49fQJtJnGVXjpBGsWcrvcOtKNbOxP5diYLfk/DxTaEqlE6nfAP9v2 aZ2ctQPTyVnZ1CCDWO1Ci3d0OGAgZqpgxAuQl7Pfe022slvKcJMw5+cHiTcUr0mJ/PwaBn xRjJx3FLlgMjOVRNTLzcIWBd0If1AQY= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-36-uv7ui77NPeCATj9nlg43Ig-1; Fri, 25 Feb 2022 08:57:22 -0500 X-MC-Unique: uv7ui77NPeCATj9nlg43Ig-1 Received: by mail-wr1-f71.google.com with SMTP id v17-20020adfa1d1000000b001ed9d151569so910030wrv.21 for ; Fri, 25 Feb 2022 05:57:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ukxvDhQHQU5ZMlPHfwxc9mo55NDeLPrYW0hNKjPOnN0=; b=MoMrXLInQZaQCOW3RNp2cObzAoPTZ6iydMzpBw7B6dknCBjSHT/baf+fd+qyy/2pZT z9DoDCrb4Q4vAEdxScDNSR7IdAtIl2ITtiorCJRNU+YgtLs31xkp2mbzDuDUKpzR/qjw FnL2TXXlEecayS8TAPebhkGkggUANArmppvuDXbIi2+ZhIJHSMrSSUfM3Wjxmhh2fEM8 nzTIpQm+w9laQGUUhqODQF6FlagLlupkUQ+VrNE4VaoJT4b4pMCYrqjST/UrloY6hGeM rnmxa9iiaH8OJw/KisuLP6EArpQouJxyR3kBZHCkXsTHsS20Cetcv5z09m4FAq9eHooU bSig== X-Gm-Message-State: AOAM531HNjvEt9tOnE8oaBi1XdyzxpC6+H0tMDRU2WH0rImxZpTkLFSK ViKnlkDf6C4iTP6/YPihhFpfzWtcgulWPG/KCznwT4JeH36gs8Yep9yD7W5raBM4G8Uftc4dm4R VuTSZFpSDoUe2f2pUPrbS27X9ixxiS8teWQZWm3DXDIl/xz5yXhL60h80vUMHxzo= X-Received: by 2002:a05:600c:3c8b:b0:37f:1546:40c9 with SMTP id bg11-20020a05600c3c8b00b0037f154640c9mr2858634wmb.161.1645797441114; Fri, 25 Feb 2022 05:57:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxleEs3OvIvzdNoVwqTDXEKG4S8B/jt42BY7+7Cy3mDRXEMPGrEN/IDxccRj76gvbubdwDRaA== X-Received: by 2002:a05:600c:3c8b:b0:37f:1546:40c9 with SMTP id bg11-20020a05600c3c8b00b0037f154640c9mr2858615wmb.161.1645797440908; Fri, 25 Feb 2022 05:57:20 -0800 (PST) Received: from t590.redhat.com (lfbn-gre-1-180-51.w90-112.abo.wanadoo.fr. [90.112.144.51]) by smtp.gmail.com with ESMTPSA id p30-20020a1c545e000000b003811f9102c0sm3911049wmi.32.2022.02.25.05.57.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 05:57:20 -0800 (PST) From: =?UTF-8?q?Renaud=20M=C3=A9trich?= To: grub-devel@gnu.org Cc: =?UTF-8?q?Renaud=20M=C3=A9trich?= Subject: [PATCH v4 1/3] search: fixed bug stopping iteration when --no-floppy is used Date: Fri, 25 Feb 2022 14:57:15 +0100 Message-Id: <20220225135717.66410-2-rmetrich@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220225135717.66410-1-rmetrich@redhat.com> References: <20220225135717.66410-1-rmetrich@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=rmetrich@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=170.10.133.124; envelope-from=rmetrich@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2022 13:57:30 -0000 X-List-Received-Date: Fri, 25 Feb 2022 13:57:30 -0000 When using --no-floppy and a floppy was encountered, iterate_device() was returning 1, causing the iteration to stop instead of continuing. Signed-off-by: Renaud Métrich --- grub-core/commands/search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/commands/search.c b/grub-core/commands/search.c index ed090b3af..51656e361 100644 --- a/grub-core/commands/search.c +++ b/grub-core/commands/search.c @@ -64,7 +64,7 @@ iterate_device (const char *name, void *data) /* Skip floppy drives when requested. */ if (ctx->no_floppy && name[0] == 'f' && name[1] == 'd' && name[2] >= '0' && name[2] <= '9') - return 1; + return 0; #ifdef DO_SEARCH_FS_UUID #define compare_fn grub_strcasecmp -- 2.34.1