Message ID | 20241115021549.671932-1-asmadeus@codewreck.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [u-boot,v2] fs: btrfs: hide duplicate 'Cannot lookup file' error on 'load' | expand |
On Fri, 15 Nov 2024 11:15:47 +0900, Dominique Martinet wrote: > Running commands such as 'load mmc 2:1 $addr $path' when path does not > exists will print an error twice if the file does not exist, e.g.: > ``` > Cannot lookup file boot/boot.scr > Failed to load 'boot/boot.scr' > ``` > (where the first line is printed by btrfs and the second by common fs > code) > > [...] Applied to u-boot/master, thanks!
diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c index 350cff0cbca0..f3087f690fa4 100644 --- a/fs/btrfs/btrfs.c +++ b/fs/btrfs/btrfs.c @@ -193,7 +193,7 @@ int btrfs_size(const char *file, loff_t *size) ret = btrfs_lookup_path(fs_info->fs_root, BTRFS_FIRST_FREE_OBJECTID, file, &root, &ino, &type, 40); if (ret < 0) { - printf("Cannot lookup file %s\n", file); + debug("Cannot lookup file %s\n", file); return ret; } if (type != BTRFS_FT_REG_FILE) {