-
Notifications
You must be signed in to change notification settings - Fork 1.5k
sim_hostfs:add host_errno_convert API for convert result #15552
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
Conversation
[Experimental Bot, please feedback here] Yes, this PR appears to meet the NuttX requirements, although it could be more thorough. Strengths:
Weaknesses and Suggestions for Improvement:
Specific Recommendations:
By addressing these points, the PR will be more complete and easier for reviewers to evaluate. A more complete PR will increase the likelihood of it being merged quickly. |
@yamt could you review the change match your expect? |
|
56265d9
to
3b4d3dc
Compare
Signed-off-by: chenrun1 <[email protected]>
3b4d3dc
to
dea6174
Compare
it's better to apply the complex approach util we hit the problem you describe.
apply the similar code to xtensa_hostfs.c.
OK, if you want. |
do you mean s/apply/avoid/ ?
i guess #15535 should be reverted until all backends are updated.
ditto. |
this has two purposes: * reduce linux assumptions in sim (this is a follow-up of apache#15552) * demonstrate errno.csv can be used for other purposes Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
tested with ELOOP, which is 62 on macOS and 40 on NuttX, on sim/macOS. ```shell spacetanuki% ln -s a a spacetanuki% cat a cat: a: Too many levels of symbolic links spacetanuki% ./nuttx NuttShell (NSH) NuttX-10.4.0 nsh> mount -t hostfs -o fs=. /mnt nsh> cat /mnt/a nsh: cat: open failed: 40 nsh> ``` this is a follow-up of apache#15552 this fixes a non-linux regression in apache#15535 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this has two purposes: * reduce linux assumptions in sim (this is a follow-up of apache#15552) * demonstrate errno.csv can be used for other purposes Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
tested with ELOOP, which is 62 on macOS and 40 on NuttX, on sim/macOS. ```shell spacetanuki% ln -s a a spacetanuki% cat a cat: a: Too many levels of symbolic links spacetanuki% ./nuttx NuttShell (NSH) NuttX-10.4.0 nsh> mount -t hostfs -o fs=. /mnt nsh> cat /mnt/a nsh: cat: open failed: 40 nsh> ``` this is a follow-up of apache#15552 this fixes a non-linux regression in apache#15535 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this has two purposes: * reduce linux assumptions in sim (this is a follow-up of apache#15552) * demonstrate errno.csv can be used for other purposes Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
tested with ELOOP, which is 62 on macOS and 40 on NuttX, on sim/macOS. ```shell spacetanuki% ln -s a a spacetanuki% cat a cat: a: Too many levels of symbolic links spacetanuki% ./nuttx NuttShell (NSH) NuttX-10.4.0 nsh> mount -t hostfs -o fs=. /mnt nsh> cat /mnt/a nsh: cat: open failed: 40 nsh> ``` this is a follow-up of apache#15552 this fixes a non-linux regression in apache#15535 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this has two purposes: * reduce linux assumptions in sim (this is a follow-up of apache#15552) * demonstrate errno.csv can be used for other purposes Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
tested with ELOOP, which is 62 on macOS and 40 on NuttX, on sim/macOS. ```shell spacetanuki% ln -s a a spacetanuki% cat a cat: a: Too many levels of symbolic links spacetanuki% ./nuttx NuttShell (NSH) NuttX-10.4.0 nsh> mount -t hostfs -o fs=. /mnt nsh> cat /mnt/a nsh: cat: open failed: 40 nsh> ``` this is a follow-up of apache#15552 this fixes a non-linux regression in apache#15535 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this has two purposes: * reduce linux assumptions in sim (this is a follow-up of apache#15552) * demonstrate errno.csv can be used for other purposes Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
tested with ELOOP, which is 62 on macOS and 40 on NuttX, on sim/macOS. ```shell spacetanuki% ln -s a a spacetanuki% cat a cat: a: Too many levels of symbolic links spacetanuki% ./nuttx NuttShell (NSH) NuttX-10.4.0 nsh> mount -t hostfs -o fs=. /mnt nsh> cat /mnt/a nsh: cat: open failed: 40 nsh> ``` this is a follow-up of apache#15552 this fixes a non-linux regression in apache#15535 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this has two purposes: * reduce linux assumptions in sim (this is a follow-up of apache#15552) * demonstrate errno.csv can be used for other purposes Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
tested with ELOOP, which is 62 on macOS and 40 on NuttX, on sim/macOS. ```shell spacetanuki% ln -s a a spacetanuki% cat a cat: a: Too many levels of symbolic links spacetanuki% ./nuttx NuttShell (NSH) NuttX-10.4.0 nsh> mount -t hostfs -o fs=. /mnt nsh> cat /mnt/a nsh: cat: open failed: 40 nsh> ``` this is a follow-up of apache#15552 this fixes a non-linux regression in apache#15535 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this has two purposes: * reduce linux assumptions in sim (this is a follow-up of apache#15552) * demonstrate errno.csv can be used for other purposes Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
this is a follow-up of apache#15552 Signed-off-by: YAMAMOTO Takashi <[email protected]>
tested with ELOOP, which is 62 on macOS and 40 on NuttX, on sim/macOS. ```shell spacetanuki% ln -s a a spacetanuki% cat a cat: a: Too many levels of symbolic links spacetanuki% ./nuttx NuttShell (NSH) NuttX-10.4.0 nsh> mount -t hostfs -o fs=. /mnt nsh> cat /mnt/a nsh: cat: open failed: 40 nsh> ``` this is a follow-up of apache#15552 this fixes a non-linux regression in apache#15535 Signed-off-by: YAMAMOTO Takashi <[email protected]>
Summary
This PR comes from the discussion of #15535 (comment).
A common conversion interface
host_errno_convert
is provided inarch/sim/posix
. Subsequent contributors with needs can add host to nuttx errno conversion hereImpact
Modified all places where errno is returned in
arch/sim/posix
to be converted viahost_errno_convert
before returning (current implementation is to return directly)Testing
Build Host(s): Linux x86
Target(s): sim/nsh