-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add Directory file descriptor relative syscall. #307
Add Directory file descriptor relative syscall. #307
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
At the moment, I haven't included AT_constant from Some syscall like Whereas I don't know what target I must add or link option. I will need some help about this. |
Looks like a good set of APIs to add to me! The next step is appeasing Travis :) It looks like the compile is failing on all compilers right now? Some APIs may not be available on all platforms, but those can just be pushed down the module hierarchy into a more specific location. |
About Should I move the original definition to a more specific place with an appropriate compilation attribute? |
Ah in libc we don't use |
So now I managed to get it on all platforms excepted OSX and IOS. How can do it? Moving all syscall in freebsd/netbsd/openbsd and Linux? |
Yeah you'll probably just need to copy them around into the relevant files (which is fine to have duplication) |
I copied the code were needed. Thanks for the help. :) |
Looks like there's an API which also may not be defined on Android? |
I managed to build it on a mac at my university. I get this message fairly different than Travis: https://gist.github.com/darnuria/345636315461273ad591cc8b075c47cb Here the kernel and OSX version of the computer: |
Yeah looks like OSX is the only one still failing, and looks like it's just a few functions that aren't defined on OSX? |
Yes, but they appear on my university's OSX version. What is Travis's OSX version? |
Oh I believe it's 10.9 or something like that but we can request a newer version, feel free to either omit the bindings or update .travis.yml to include the newer images as well! |
Is it a relevant idea to support the newer version of OSX? I don't now what is the widespread version of OSX among Rust developers. If it's worth it I can change the version in |
@darnuria libc aims to define the most up-to-date versions of APIs; see @alexcrichton's comment: #232 (comment) I think it makes sense to bump the version in |
I can run it (with a runtime error on
There is a differences of between the address returned by C and Rust. |
Ok I got it. Some weird thing with OS due to stat structure and 64bits Inodes. Solved by adding |
I only added "*at" syscall relative to Posix2008 specification. At the moment OSX and Android are partially supporting this API. This include: * `openat` * `faccessat` * `fchmodat` * `fchownat` * `fstatat` * `linkat` * `mkdirat` * `mknodat` [0] * `readlinkat` * `renameat` * `symlinkat` * `unlinkat` * `mkfifoat` [0][1] [1] Not available on Android at the moment: * `mkfifo` [1] Not available on OSX at the moment: * `mkfifoat` * `mknodat` And exclude operating system specific API: * `renameat2`: Linux specific * `execveat`: Linux specific since 3.19 * `futimesat`: GNU extension * `name_to_handle_at`: GNU extension * `scandirat`: GNU extension * `fanotify_mark`: belong to fanotify API.
…xcrichton Add Directory file descriptor relative syscall. Add Directory file descriptor relative syscall. I only added "*at" syscall relative to Posix2008 specification. At the moment OSX and Android are partially supporting this API. This include: * `openat` * `faccessat` * `fchmodat` * `fchownat` * `fstatat` * `linkat` * `mkdirat` * `mknodat` [0] * `readlinkat` * `renameat` * `symlinkat` * `unlinkat` * `mkfifoat` [0][1] [1] Not available on Android at the moment: * `mkfifo` [1] Not available on OSX at the moment: * `mkfifoat` * `mknodat` And exclude operating system specific API: * `renameat2`: Linux specific * `execveat`: Linux specific since 3.19 * `futimesat`: GNU extension * `name_to_handle_at`: GNU extension * `scandirat`: GNU extension * `fanotify_mark`: belong to fanotify API.
💔 Test failed - travis |
@bors: retry On Fri, Jun 10, 2016 at 11:29 AM, bors notifications@github.com wrote:
|
…xcrichton Add Directory file descriptor relative syscall. Add Directory file descriptor relative syscall. I only added "*at" syscall relative to Posix2008 specification. At the moment OSX and Android are partially supporting this API. This include: * `openat` * `faccessat` * `fchmodat` * `fchownat` * `fstatat` * `linkat` * `mkdirat` * `mknodat` [0] * `readlinkat` * `renameat` * `symlinkat` * `unlinkat` * `mkfifoat` [0][1] [1] Not available on Android at the moment: * `mkfifo` [1] Not available on OSX at the moment: * `mkfifoat` * `mknodat` And exclude operating system specific API: * `renameat2`: Linux specific * `execveat`: Linux specific since 3.19 * `futimesat`: GNU extension * `name_to_handle_at`: GNU extension * `scandirat`: GNU extension * `fanotify_mark`: belong to fanotify API.
💔 Test failed - travis |
@bors: retry shakes fist On Fri, Jun 10, 2016 at 12:02 PM, bors notifications@github.com wrote:
|
…xcrichton Add Directory file descriptor relative syscall. Add Directory file descriptor relative syscall. I only added "*at" syscall relative to Posix2008 specification. At the moment OSX and Android are partially supporting this API. This include: * `openat` * `faccessat` * `fchmodat` * `fchownat` * `fstatat` * `linkat` * `mkdirat` * `mknodat` [0] * `readlinkat` * `renameat` * `symlinkat` * `unlinkat` * `mkfifoat` [0][1] [1] Not available on Android at the moment: * `mkfifo` [1] Not available on OSX at the moment: * `mkfifoat` * `mknodat` And exclude operating system specific API: * `renameat2`: Linux specific * `execveat`: Linux specific since 3.19 * `futimesat`: GNU extension * `name_to_handle_at`: GNU extension * `scandirat`: GNU extension * `fanotify_mark`: belong to fanotify API.
☀️ Test successful - status-appveyor, travis |
Update signalfd Update `signalfd` to use types and functions from `libc`. It is a breaking change, because: - renamed pub const `CREATE_NEW_FD` to `SIGNALFD_NEW` - renamed pub const `SIGINFO_SIZE` to `SIGNALFD_SIGINFO_SIZE` - removed pub const `SIGINFO_PADDING` Fixes rust-lang#307
Looks like intrinsics that weren't listing a target feature were accidentally omitted from the verification logic, so this commit fixes that! Along the way I've ended up filing rust-lang#307 and rust-lang#308 for detected inconsistencies.
Add Directory file descriptor relative syscall.
I only added "*at" syscall relative to Posix2008 specification.
At the moment OSX and Android are partially supporting this API.
This include:
openat
faccessat
fchmodat
fchownat
fstatat
linkat
mkdirat
mknodat
[0]readlinkat
renameat
symlinkat
unlinkat
mkfifoat
[0][1][1] Not available on Android at the moment:
mkfifo
[1] Not available on OSX at the moment:
mkfifoat
mknodat
And exclude operating system specific API:
renameat2
: Linux specificexecveat
: Linux specific since 3.19futimesat
: GNU extensionname_to_handle_at
: GNU extensionscandirat
: GNU extensionfanotify_mark
: belong to fanotify API.