Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fHDf6-00084q-Ro for mharc-grub-devel@gnu.org; Fri, 11 May 2018 15:25:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHDf3-0007r3-EH for grub-devel@gnu.org; Fri, 11 May 2018 15:25:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHDf0-0001uM-Px for grub-devel@gnu.org; Fri, 11 May 2018 15:25:01 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:53442) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHDf0-0001tt-Im for grub-devel@gnu.org; Fri, 11 May 2018 15:24:58 -0400 Received: by mail-wm0-x243.google.com with SMTP id a67-v6so4210014wmf.3 for ; Fri, 11 May 2018 12:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1ZdSNiE6m8lqJrXyEd193GwoyNvHSGjNcMgp7zNIcv8=; b=pJI77saR3awv/v400lRcAksdKZ0cBXcT71ePnPtgxiSW3+M5eCfO+aieh6ED1BVJRF AlltFX1WELpnrCyz3pRoD8woCb9pl9465sKk5GyRsH7NTgyxVTR7eFRIX5nsOkMVUlG3 0fo6QhU3ttIJimPOWBYczjp9xqGyhRz4XeJ1ikdYGqXaZCOWB/+LSXQHKA7O3eBaX/Z3 n0hCLA1XuhSP7eOJzL0DULOY0zQm0Cg+R4mRZRxmRxknn5iKEtEbO9d+Zy+oRDIGpyO8 a7mR62wuxnhtGuXBEVBciPoa5PyrzgxjuRv6Uu1TKJuTlhDiZqG29P6TOFhPhoca7GoH 9HQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1ZdSNiE6m8lqJrXyEd193GwoyNvHSGjNcMgp7zNIcv8=; b=Mz+Vzw8/Zq0ESXKKo9dsJMtefMi/VTRhsI58K2Us1r10tTZY6hWK3kspljyTL9cHG+ mQ7YoTX1PaHN+6Et+0k0arGDLJz+1yOnnaCBQE3OF44awnlyRr490tBrXY6dDgvaJ5Th vOErI5edF5iOyO9GrhbNwJk5XEud7kFbIeFYpZ2Xj5SyEWPF8G9VXrxymrpMhwyyWgwi I/b344KIXHUB/0gIdUZoQzCTidLPFgvw7Y0MMnKOd01nHDgoqq1jYb4zvammD+8Vf/lZ X7oRdUvzL08/dxuZM+ut4IfFPzoaSy8jFA4b9NESgH44QT8yby6qo/5beiJg5vyWTmTG T4/A== X-Gm-Message-State: ALKqPwcS8fhNw5cVlCk0JA+nRFWnjI3gaLEKoqDzc+pLjDEphyciIbjg Bkl2cY37WWbHEnikJqw/6z4T8g== X-Google-Smtp-Source: AB8JxZp4wSpnOvRTMXD29+0+QtW6q/AK3ByHPbuKPT/6bLN3XuLRM2/7mddkjzSYFxp22EFYMhaADQ== X-Received: by 2002:a1c:e182:: with SMTP id y124-v6mr2788669wmg.57.1526066697302; Fri, 11 May 2018 12:24:57 -0700 (PDT) Received: from venice.bhome (94-38-18-100.adsl-ull.clienti.tiscali.it. [94.38.18.100]) by smtp.gmail.com with ESMTPSA id m134-v6sm3495664wmg.13.2018.05.11.12.24.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 May 2018 12:24:56 -0700 (PDT) From: Goffredo Baroncelli X-Google-Original-From: Goffredo Baroncelli To: grub-devel@gnu.org Cc: Goffredo Baroncelli Subject: [PATCH 3/8] Move the error logging logic from find_device() to the callee. Date: Fri, 11 May 2018 21:24:41 +0200 Message-Id: <20180511192446.15942-4-kreijack@inwind.it> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180511192446.15942-1-kreijack@inwind.it> References: <20180511192446.15942-1-kreijack@inwind.it> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2018 19:25:02 -0000 This is a preparatory patch. The callee knows better if this error is fatal, or if it exists another available disk. Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index 186864ac9..020d20ae6 100644 --- a/grub-core/fs/btrfs.c +++ b/grub-core/fs/btrfs.c @@ -604,9 +604,6 @@ find_device (struct grub_btrfs_data *data, grub_uint64_t id, int do_rescan) grub_device_iterate (find_device_iter, &ctx); if (!ctx.dev_found) { - grub_error (GRUB_ERR_BAD_FS, - N_("couldn't find a necessary member device " - "of multi-device filesystem")); return NULL; } data->n_devices_attached++; @@ -893,6 +890,9 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data, grub_disk_addr_t addr, dev = find_device (data, stripe->device_id, j); if (!dev) { + grub_dprintf ("btrfs", + "couldn't find a necessary member device " + "of multi-device filesystem\n"); err = grub_errno; grub_errno = GRUB_ERR_NONE; continue; -- 2.17.0