[Answered] Virtual File System: Returning an error code ...
Posted: Sat Nov 05, 2016 4:56 pm
When we implement a VFS and wish to return an error code, what is the correct way to perform that task?
For example, I am imagining an underlying call to open() to open a file. If the file does not actually exist, what is the correct procedure to return such an indication? In Unix, I believe open() would return "-1" and the global errno would indicate the last error. In the ESP-IDF environment, should we return -1 from our VFS function and set errno explicitly before return?
For example, I am imagining an underlying call to open() to open a file. If the file does not actually exist, what is the correct procedure to return such an indication? In Unix, I believe open() would return "-1" and the global errno would indicate the last error. In the ESP-IDF environment, should we return -1 from our VFS function and set errno explicitly before return?