grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/9] btrfs: Move the error logging from find_device() to its call


From: 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

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]