Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fPY8e-0004BV-BB for mharc-grub-devel@gnu.org; Sun, 03 Jun 2018 14:54:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPY8c-0004AW-7C for grub-devel@gnu.org; Sun, 03 Jun 2018 14:53:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPY8a-0008Uq-MP for grub-devel@gnu.org; Sun, 03 Jun 2018 14:53:58 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:40030) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPY8a-0008UH-Fg for grub-devel@gnu.org; Sun, 03 Jun 2018 14:53:56 -0400 Received: by mail-wm0-x243.google.com with SMTP id x2-v6so10650195wmh.5 for ; Sun, 03 Jun 2018 11:53:56 -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=Gn+7pn2uxZyn2b/DDBzd7quDl88tDn+Lt6kY0WstGIc=; b=gmbrFMXuKg14f6+oQNbJz4/0AgDfACwifz+sUNRsNz0ouU8dPadWeI2lXiRMzaDx4N UILQJ8UsvKTW5VO8FlOr/kadkvLdi0pOmFTGZCWQCAAOrxjaKCOW0z/eozBFbTx+hxDl pNQp1jUznmSSp2+gQVYvRjBqHnSjyyldzYaFDkAC7J7DJ2yVYchfLC1gDzcQ1Pgvxhcj jku6Z2VQBCCWlv/aSS4Fs1+NkS2yovIrUqzwV0kLKqPdMiVUOq5Te1B+hkQHFL6BHD4o 2pNTMbu2//nauzFR4hM3FwkBqVUVxTqDqxev+lLTlmcOQLHhDKL15xO+SXr5x0/owhZR pI3w== 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=Gn+7pn2uxZyn2b/DDBzd7quDl88tDn+Lt6kY0WstGIc=; b=qZDp6tDTIWHfEU5atDEqhsilJTEs4eczwkbUKsmTRjhyhH6CH07pJ4TGNLfE9/WvOd u2awks2kZuLwjBl7SO/0S56xGEKMpIs+EigAf1Hmfiw/9ztIFFjUFdYtK3g1xVQ4Z2l8 5sW4FwKEhQViy5dr/stLdd6dkx3P1GA6qyzoWkcgLoXj/pmXxkzBD90isuHRe7ObVF0/ UOwjlOhqpKsbfnMm+zjIWGE1K5/fOFW2Rxk46qwXq2B8sI/1XrifbeQ/pcyl5Avcszh1 3ISJmv7LAbG8hspBloHJaU1puNokXO+TsfU7dmOWEy4mHRegQL++GICdOvvjMweiqEmw /9yg== X-Gm-Message-State: ALKqPwcdRoa5n65kpA4AHTd3XDfrWHeDYFy647eoaGdOxM7CeiNssgnx NUa6yM5XDblinX2qrxgqj54rSg== X-Google-Smtp-Source: ADUXVKJxfZ/7+qW5NYHm3LrNdtPcaWC0nplvQiva2wOrcuilCVirWCbFt4pL4Jv4Apz1YO0yBN3c1g== X-Received: by 2002:a1c:ae8b:: with SMTP id x133-v6mr7778238wme.125.1528052035235; Sun, 03 Jun 2018 11:53:55 -0700 (PDT) Received: from venice.bhome (84-223-211-96.adsl-wholesale.clienti.tiscali.it. [84.223.211.96]) by smtp.gmail.com with ESMTPSA id b124-v6sm1279940wmf.11.2018.06.03.11.53.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jun 2018 11:53:54 -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: Sun, 3 Jun 2018 20:53:42 +0200 Message-Id: <20180603185348.1780-4-kreijack@inwind.it> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180603185348.1780-1-kreijack@inwind.it> References: <20180603185348.1780-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: Sun, 03 Jun 2018 18:53:59 -0000 This is a preparatory patch. The caller knows better if this error is fatal or not, i.e. another disk is available or not. 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 669c49301..9b3a22772 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.17.1