Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oCRgi-0007N3-2Z for mharc-grub-devel@gnu.org; Fri, 15 Jul 2022 16:13:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oCRgc-0007LI-SI for grub-devel@gnu.org; Fri, 15 Jul 2022 16:13:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:41071) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oCRgb-0005mf-Cp for grub-devel@gnu.org; Fri, 15 Jul 2022 16:13:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657915996; 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=9BRYwWMl7HlG2YJf8XETvqN5GqF2F3suGp1QkOtoGb0=; b=TqHnR8H8N3a5PKmEtbI4B/SjcSgz/MAlOEwibDfWPpLqwrLsbjQ7R+GzTgYf4zHhlYWvgB 1HYhLflRvJ6QCA0miQacSC3Gzn0tBDSx4re8hJomxRkpd1FgyydkioCvMJZ22HUNyvoU2H Z76rvXA6EFZjKWuHn4wukddyXdcnB4A= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-317-l-_3CQSfM3GzCUGNCWwnaQ-1; Fri, 15 Jul 2022 16:13:10 -0400 X-MC-Unique: l-_3CQSfM3GzCUGNCWwnaQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A188B85A589 for ; Fri, 15 Jul 2022 20:13:08 +0000 (UTC) Received: from eesha.redhat.com (unknown [10.22.32.145]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8365B492C3B; Fri, 15 Jul 2022 20:13:08 +0000 (UTC) From: Robbie Harwood To: grub-devel@gnu.org Cc: Robbie Harwood Subject: [PATCH v1 2/3] grub_fs_probe(): dprint errors from filesystems Date: Fri, 15 Jul 2022 16:13:01 -0400 Message-Id: <20220715201302.16108-3-rharwood@redhat.com> In-Reply-To: <20220715201302.16108-1-rharwood@redhat.com> References: <20220715201302.16108-1-rharwood@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=rharwood@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Received-SPF: pass client-ip=170.10.129.124; envelope-from=rharwood@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, 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, 15 Jul 2022 20:13:19 -0000 When filesystem detection fails, all that's currently debug-logged is a series of messages like: grub-core/kern/fs.c:56:fs: Detecting ntfs... grub-core/kern/fs.c:76:fs: ntfs detection failed. repeated for each filesystem. Any messages provided to grub_error() by the filesystem are lost, and one has to break out gdb to figure out what went wrong. With this change, one instead sees: grub-core/kern/fs.c:56:fs: Detecting fat... grub-core/osdep/hostdisk.c:357:hostdisk: reusing open device `/path/to/device' grub-core/kern/fs.c:77:fs: error: invalid modification timestamp for /. grub-core/kern/fs.c:79:fs: fat detection failed. in the debug prints. Signed-off-by: Robbie Harwood --- grub-core/kern/fs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/grub-core/kern/fs.c b/grub-core/kern/fs.c index e0d7e16a29..bb1d8cc9dd 100644 --- a/grub-core/kern/fs.c +++ b/grub-core/kern/fs.c @@ -74,6 +74,7 @@ grub_fs_probe (grub_device_t device) if (grub_errno == GRUB_ERR_NONE) return p; + grub_dprintf ("fs", _("error: %s.\n"), grub_errmsg); grub_error_push (); grub_dprintf ("fs", "%s detection failed.\n", p->name); grub_error_pop (); -- 2.35.1