mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 23:32:39 +00:00
btrfs: Move the error logging from find_device() to its caller
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 <kreijack@inwind.it> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
846f7a8310
commit
908cdb1d02
1 file changed
+3
-5
@@ -603,12 +603,7 @@ find_device (struct grub_btrfs_data *data, grub_uint64_t id, int do_rescan)
|
|||||||
if (do_rescan)
|
if (do_rescan)
|
||||||
grub_device_iterate (find_device_iter, &ctx);
|
grub_device_iterate (find_device_iter, &ctx);
|
||||||
if (!ctx.dev_found)
|
if (!ctx.dev_found)
|
||||||
{
|
|
||||||
grub_error (GRUB_ERR_BAD_FS,
|
|
||||||
N_("couldn't find a necessary member device "
|
|
||||||
"of multi-device filesystem"));
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
data->n_devices_attached++;
|
data->n_devices_attached++;
|
||||||
if (data->n_devices_attached > data->n_devices_allocated)
|
if (data->n_devices_attached > data->n_devices_allocated)
|
||||||
{
|
{
|
||||||
@@ -905,6 +900,9 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data, grub_disk_addr_t addr,
|
|||||||
dev = find_device (data, stripe->device_id, j);
|
dev = find_device (data, stripe->device_id, j);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
{
|
{
|
||||||
|
grub_dprintf ("btrfs",
|
||||||
|
"couldn't find a necessary member device "
|
||||||
|
"of multi-device filesystem\n");
|
||||||
err = grub_errno;
|
err = grub_errno;
|
||||||
grub_errno = GRUB_ERR_NONE;
|
grub_errno = GRUB_ERR_NONE;
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in new issue
Block a user