fs: btrfs: hide 'Cannot lookup file' errors on 'load'
Dominique Martinet wrote on Wed, Nov 06, 2024 at 09:56:42AM +0900:
Quoted 7 lines
Running commands such as 'load mmc 2:1 $addr $path' when path does not exists historically do not print any error on filesystems such as ext4 or fat.
Changing the root filesystem to btrfs would make existing boot script print 'Cannot lookup file xxx' errors, confusing customers wondering if there is a problem when the mmc load command was used in a if (for example to load boot.scr conditionally)
Ugh, sorry, I was a bit quick on checking with an updated u-boot on this... our tree is *cough* slightly *cough* old and that was the case at the time, but since somewhere in 2020 there is a warning in fs/fs.c in case load fails.
That doesn't change the fact that this patch is useful to avoid the message being printed twice, but I'll need to update my scripts anyway to use size first instead (as a first approximation of test -e)
Please let me know if you want me to resend this with an updated commit message; otherwise I'll let this sleep.
Signature · 1 line
Dominique
Quoted 14 lines · Dominique Martinet
Dominique Martinet wrote on Wed, Nov 06, 2024 at 09:56:42AM +0900:
Quoted 7 lines
Running commands such as 'load mmc 2:1 $addr $path' when path does not exists historically do not print any error on filesystems such as ext4 or fat.
Changing the root filesystem to btrfs would make existing boot script print 'Cannot lookup file xxx' errors, confusing customers wondering if there is a problem when the mmc load command was used in a if (for example to load boot.scr conditionally)Ugh, sorry, I was a bit quick on checking with an updated u-boot on this... our tree is *cough* slightly *cough* old and that was the case at the time, but since somewhere in 2020 there is a warning in
fs/fs.cin case load fails.
Quoted 6 lines
That doesn't change the fact that this patch is useful to avoid the message being printed twice, but I'll need to update my scripts anyway to use
sizefirst instead (as a first approximation oftest -e)Please let me know if you want me to resend this with an updated commit message; otherwise I'll let this sleep.
Yes, please reword the commit message based on current overall behavior, thanks!
Signature · 1 line
Tom