Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fVKc1-000149-Fa for mharc-grub-devel@gnu.org; Tue, 19 Jun 2018 13:40:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVKby-0000zX-UY for grub-devel@gnu.org; Tue, 19 Jun 2018 13:40:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVKby-0007Xt-1n for grub-devel@gnu.org; Tue, 19 Jun 2018 13:40:10 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:52724) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVKbx-0007W9-SE for grub-devel@gnu.org; Tue, 19 Jun 2018 13:40:09 -0400 Received: by mail-wm0-x243.google.com with SMTP id p126-v6so1738700wmb.2 for ; Tue, 19 Jun 2018 10:40:09 -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=y6ldm8OxcDINhMZeUQwpim7vsBcXpPXhFZi6SIsTvZ0=; b=SSnKmtOqzkZ6cy9oAdmN6CIrjJftYULaRHeMfrR/uLirgKheqbQ//HHaJGIzqDPU8N NK7nbeXiapkqoo9x7/iMtOXc7GYSFB13GZdER5AkfMkuZCk5hxf4R8i3w6U999ki2mEo 8aiLz3I6frOnSgFWzw3zDDmV4DlJJqY46wqTpbRqZfdm6BmerW02e1omvsJRpxTQ9w7U dlSDZcyi8JhhQ5U4ib6UeuhEjEYifODO0aEDXCRnjxSqJtdLYvyQNwjWlRMU0OJ3r6Z8 /pDtBOW2vJcxhPIleOyGdZQnXozZzPnTwOtyZh5lkII+LT2xD6PrQeXA1Idz5qOOYjSe +T6g== 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=y6ldm8OxcDINhMZeUQwpim7vsBcXpPXhFZi6SIsTvZ0=; b=R6hlKXILbs4PdPjaFEDqtlU9J1VRPy2/D0uXU+M4xpci+RoUjW0B4FhWPofWJlkHw7 IJ9MdIiuw1W50lvLtxr/3SApNN9shE5WcjGbXHMNyNFmbAPUvbO4/XMMpmReGT3dUCKz /gCxefzyts7Cfu+tnGPF83cUeKbQgGiHDhZQKham/qGKXmdGgRbSX3e8MX25wLdNq1Bc mYfAUYNqUsshVPkeWahG1Y3vvQOaqSnrJlynoj4uSDsP8kTylNLcOWNX9zWdwS2HBrU5 QBYxRciHhgd6vBW3cXFRLrTfcNoweNsYaDTC2/tokovu82XoOEwm57Obi/ZrXFAPLtTI nyng== X-Gm-Message-State: APt69E3EHVskj21pjXyMt+yUQxF2ka+ELzExqacOqWpZhP317tUz2lYC lUTIis3/3xcUZeP0v6pwiF7rHQ== X-Google-Smtp-Source: ADUXVKJtJYESiBQdX0eWFTtxjcgmtEQA7vf3OVQ1skueDjplEpnAJbmCO5vCGh0dJq0gXYIEjHZ9NQ== X-Received: by 2002:a1c:f906:: with SMTP id x6-v6mr12743169wmh.63.1529430008602; Tue, 19 Jun 2018 10:40:08 -0700 (PDT) Received: from venice.bhome (84-223-210-152.adsl-wholesale.clienti.tiscali.it. [84.223.210.152]) by smtp.gmail.com with ESMTPSA id i4-v6sm291776wrq.28.2018.06.19.10.40.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jun 2018 10:40:08 -0700 (PDT) From: Goffredo Baroncelli X-Google-Original-From: Goffredo Baroncelli To: grub-devel@gnu.org Cc: Goffredo Baroncelli Subject: [PATCH 3/9] btrfs: Move the error logging from find_device() to its caller. Date: Tue, 19 Jun 2018 19:39:50 +0200 Message-Id: <20180619173956.7356-4-kreijack@inwind.it> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180619173956.7356-1-kreijack@inwind.it> References: <20180619173956.7356-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: Tue, 19 Jun 2018 17:40:11 -0000 The caller knows better if this error is fatal or not, i.e. another disk is available or not. This is a preparatory patch. 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 c1eb6c521..8d07e2d72 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++; @@ -902,6 +899,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.18.0.rc2