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

sys/stat: implement mkdirat #1084

Merged
merged 1 commit into from
Jun 16, 2019

Conversation

kevinwern
Copy link
Contributor

See: https://github.com/CraneStation/wasi-common/issues/16
https://linux.die.net/man/2/mkdirat

My first contribution to this repo. Tests were probably overkill...

Also, out of curiosity, is there any reason why mkdir is located in unistd? The documentation I read mentioned the function definition also being located in sys/stat.h.

@kevinwern kevinwern force-pushed the feature/implement-mkdirat branch from 7efc042 to 515bee4 Compare June 10, 2019 03:53
test/test_stat.rs Outdated Show resolved Hide resolved
@kevinwern kevinwern force-pushed the feature/implement-mkdirat branch from 515bee4 to a844ff0 Compare June 12, 2019 03:56
Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

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

You need to wrap that long line and fix the CHANGELOG. Otherwise, it all looks good.

@kevinwern
Copy link
Contributor Author

kevinwern commented Jun 12, 2019

Switched the error condition to ENOTDIR because I suspected the FreeBSD build was failing due to set_permissions (or subsequent permission-related things)... not sure if that's the case, but seems to be passing now.

@kevinwern kevinwern force-pushed the feature/implement-mkdirat branch from a844ff0 to aab61a4 Compare June 14, 2019 02:55
@kevinwern kevinwern force-pushed the feature/implement-mkdirat branch from aab61a4 to c006491 Compare June 16, 2019 03:13
@kevinwern
Copy link
Contributor Author

Rebased again...just leaving a comment because I forget if GH sends notifications for force pushes.

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

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

bors r+

bors bot added a commit that referenced this pull request Jun 16, 2019
1084: sys/stat: implement mkdirat r=asomers a=kevinwern

See: https://github.com/CraneStation/wasi-common/issues/16
https://linux.die.net/man/2/mkdirat

My first contribution to this repo. Tests were probably overkill...

Also, out of curiosity, is there any reason why `mkdir` is located in `unistd`? The documentation I read mentioned the function definition also being located in `sys/stat.h`.

Co-authored-by: Kevin Wern <kevin.m.wern@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jun 16, 2019

Build succeeded

@bors bors bot merged commit c006491 into nix-rust:master Jun 16, 2019
@kevinwern kevinwern deleted the feature/implement-mkdirat branch June 18, 2019 19:32
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.

2 participants