Hi all,
I was going through the VFS layer recently as part of learning how NuttX
handles file permissions bits and while reading through proxy_fstat() in
fs_fstat.c. I noticed a small what looks like a small typo.
In the block driver proxy path, the write permissions bits are gated on
->read instead of ->write:

Around line 120 of fs_fstat()
[image: image.png]

Because of this, a driver implementing read but not write would incorrectly
have its write bits set in the fstat() result. If there’s a reason for
checking ->read here, I’d like to understand it. If it is a typo, I can
send a small fix. Happy to be wrong and learn :)
Thanks,
Abhishek

Reply via email to