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

fs: Support O_NOFOLLOW flag #8113

Merged
merged 1 commit into from
Jan 17, 2023
Merged

fs: Support O_NOFOLLOW flag #8113

merged 1 commit into from
Jan 17, 2023

Conversation

xiaoxiang781216
Copy link
Contributor

@xiaoxiang781216 xiaoxiang781216 commented Jan 14, 2023

Summary

https://pubs.opengroup.org/onlinepubs/9699919799.2013edition/functions/open.html:
O_NOFOLLOW
If path names a symbolic link, fail and set errno to [ELOOP].

Impact

new flag

Testing

Pass CI

https://pubs.opengroup.org/onlinepubs/9699919799.2013edition/functions/open.html:
O_NOFOLLOW
If path names a symbolic link, fail and set errno to [ELOOP].

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
@acassis
Copy link
Contributor

acassis commented Jan 15, 2023

@xiaoxiang781216 I was trying to port 8086tiny to NuttX and noticed the author used some hardcoded valued when using open function: open(*argv, 32898)
Do you think make sense to change our bit flags to be compatible with Linux ?

@xiaoxiang781216
Copy link
Contributor Author

xiaoxiang781216 commented Jan 15, 2023

Yes, I think that it's better to align our macros definition to one of popular implementation(Linux and glibc is one good candidate). Actually, many people include me do the unification many times before: #7420 e0e18fc

Copy link
Contributor

@anchao anchao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anchao anchao merged commit b1899ff into apache:master Jan 17, 2023
@xiaoxiang781216 xiaoxiang781216 deleted the nofollow branch January 17, 2023 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants