Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TW#12280] VFS: Unable to map the whole file system tree using "/" #135

Closed
nkolban opened this issue Dec 3, 2016 · 8 comments
Closed

[TW#12280] VFS: Unable to map the whole file system tree using "/" #135

nkolban opened this issue Dec 3, 2016 · 8 comments
Assignees
Labels
Type: Feature Request Feature request for IDF

Comments

@nkolban
Copy link
Contributor

nkolban commented Dec 3, 2016

I am finding that I am unable to map the whole file system tree as seen by the Posix APIs using esp_vfs_register(). It appears that if I try and map "/" that returns an error code. It is as though the esp_vfs_register() requires that my mount point be subordinate to root ("/"). I am thinking that this may be too restrictive. What if I want to use VFS with just a single type of file system (for examples SPIFFS) then I want all paths to map into the SPIFFS file system not just those from a specific prefix.

For example, I want to be able to access /dir1/file1.txt and /dir2/file2.txt through SPIFFS with both files on the same SPIFFS file system.

@negativekelvin
Copy link
Contributor

negativekelvin commented Dec 3, 2016

You have no options to set base path in your code and use relative paths?

@jmattsson
Copy link

I imagine this is related to the fact the VFS does not support nested mount points, and therefore would break e.g. the /dev/uart registration.

@igrr
Copy link
Member

igrr commented Dec 7, 2016

I can implement nested mount points if there are some use cases for that.

@rojer
Copy link
Contributor

rojer commented Dec 13, 2016

i just filed #158 which is related (feel free to dedup) - need to be able to take over the entire vfs.

@igrr igrr mentioned this issue Dec 13, 2016
@igrr igrr self-assigned this Dec 13, 2016
@igrr
Copy link
Member

igrr commented Dec 13, 2016

Adding a request from @rojer here: we should support paths which don't start with /.

rojer pushed a commit to cesanta/esp-idf that referenced this issue Dec 13, 2016
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
@rojer
Copy link
Contributor

rojer commented Dec 13, 2016

fwiw, above is my stab at it.

rojer pushed a commit to cesanta/esp-idf that referenced this issue Dec 13, 2016
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Dec 19, 2016
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Dec 20, 2016
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
@projectgus projectgus added the Type: Feature Request Feature request for IDF label Dec 22, 2016
rojer pushed a commit to cesanta/esp-idf that referenced this issue Jan 12, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Jan 12, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Jan 21, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Jan 21, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Feb 9, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Feb 9, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Mar 16, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Mar 24, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Apr 13, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Apr 26, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Apr 26, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
@FayeY FayeY changed the title VFS: Unable to map the whole file system tree using "/" [TW#12280] VFS: Unable to map the whole file system tree using "/" May 4, 2017
rojer pushed a commit to cesanta/esp-idf that referenced this issue May 10, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue May 23, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
rojer pushed a commit to cesanta/esp-idf that referenced this issue Jun 16, 2017
If there are no better matches, VFS calls will fall through to this "VFS of last resort".

Temporary hack until espressif#135 is fixed.
@igrr igrr added the Status: In Progress Work is in progress label Jun 21, 2017
@igrr igrr closed this as completed in 5b678ee Jun 23, 2017
@rojer
Copy link
Contributor

rojer commented Jun 23, 2017

@igrr almost there, but relative paths like foo or conf.json are not passed to the default VFS.
#726 makes that happen.

@igrr
Copy link
Member

igrr commented Jun 26, 2017

Good catch, thanks @rojer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Request Feature request for IDF
Projects
None yet
Development

No branches or pull requests

6 participants