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

kevinwern commented Jun 10, 2019

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 kevinwern:feature/implement-mkdirat branch from 7efc042 to 515bee4 Jun 10, 2019
test/test_stat.rs Outdated Show resolved Hide resolved
@kevinwern kevinwern force-pushed the kevinwern:feature/implement-mkdirat branch from 515bee4 to a844ff0 Jun 12, 2019
Copy link
Member

asomers left a comment

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

@kevinwern

This comment has been minimized.

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 kevinwern:feature/implement-mkdirat branch from a844ff0 to aab61a4 Jun 14, 2019
@kevinwern kevinwern force-pushed the kevinwern:feature/implement-mkdirat branch from aab61a4 to c006491 Jun 16, 2019
@kevinwern

This comment has been minimized.

Copy link
Contributor Author

kevinwern commented Jun 16, 2019

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

Copy link
Member

asomers left a comment

bors r+

bors bot added a commit that referenced this pull request Jun 16, 2019
Merge #1084
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

This comment has been minimized.

Copy link
Contributor

bors bot commented Jun 16, 2019

Build succeeded

@bors bors bot merged commit c006491 into nix-rust:master Jun 16, 2019
3 checks passed
3 checks passed
FreeBSD 11.2 Task Summary
Details
bors Build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kevinwern kevinwern deleted the kevinwern:feature/implement-mkdirat branch Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.