]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
btrfs: Suppress the message about missing filesystem
authorSimon Glass <sjg@chromium.org>
Thu, 19 Aug 2021 03:40:26 +0000 (21:40 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 16 Sep 2021 17:19:25 +0000 (13:19 -0400)
This message comes up a lot when scanning filesystems. It suggests to the
user that there is some sort of error, but in fact there is no reason to
expect that a particular partition has a btrfs filesystem. Other
filesystems don't print this error.

Turn it into a debug message.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
Reviewed-by: Qu Wenruo <wqu@suse.com>
fs/btrfs/disk-io.c

index 12f9579fcf902a0d263682d853535bcac8b7d1dc..eb7736d53e11cfab4a70291162d8eb79eb305a1a 100644 (file)
@@ -918,7 +918,11 @@ static int btrfs_scan_fs_devices(struct blk_desc *desc,
 
        ret = btrfs_scan_one_device(desc, part, fs_devices, &total_devs);
        if (ret) {
-               fprintf(stderr, "No valid Btrfs found\n");
+               /*
+                * Avoid showing this when probing for a possible Btrfs
+                *
+                * fprintf(stderr, "No valid Btrfs found\n");
+                */
                return ret;
        }
        return 0;
@@ -1007,7 +1011,7 @@ struct btrfs_fs_info *open_ctree_fs_info(struct blk_desc *desc,
        disk_super = fs_info->super_copy;
        ret = btrfs_read_dev_super(desc, part, disk_super);
        if (ret) {
-               printk("No valid btrfs found\n");
+               debug("No valid btrfs found\n");
                goto out_devices;
        }