Comments (6)
ioctls appear to be inoperative at the moment.
from nix.
@agrover what do you mean?
from nix.
@carllerche on further examination I am wrong, I guess ioctl!
actually is what calls ioctl() now, and no doubt it works 😄
But some more documentation and examples around ioctl! would be great. I see how iorw!() and friends map to what was in 0.3.9, but converting read_into(x) and read_into_ptr(x) calls into ioctl!(x) is not at all clear to me, or documented as well as the old way was.
(tailhook sorry for hijacking your bug)
from nix.
@agrover, I can work on improving the documentation. For now, here's a couple pieces of code I have started to put together using the new macros:
- Working: https://github.com/posborne/rust-spidev/compare/nix-ioctl-changes
- WIP: https://github.com/posborne/rust-i2cdev/blob/master/src/linux/ffi.rs#L179 (i2c uses the "bad" ioctl variant; there are rough edges here).
To be honest, I have somewhat mixed feelings about the new macros. I think they are better in some ways but there will likely need to be some improvement on them over time to get things where they should be long term. Feedback, changes welcome.
I'm not sure how best to approach other platforms either. Some research will be required. I think it would be good to make something like the current "bad" version of the ioctl!
macro available on all platforms.
from nix.
@posborne thanks that'll get me started!
from nix.
Done!
from nix.
Related Issues (20)
- Should we add a `rust-toolchain.toml` to pin the toolchain to the MSRV HOT 2
- Out of $$$ for CI HOT 6
- Consider enabling the `unsafe_op_in_unsafe_fn` lint HOT 1
- `Epoll::add` works differently comparing to `epoll::epoll_ctl` HOT 1
- Mechanism to query existing signal handler HOT 2
- reboot api on openbsd HOT 1
- Possible Buffer-Overflow when sending control messages with `sendmmsg` HOT 2
- `recvfrom`, `recvmsg` and `recvmmsg` might return uninitialized addresses when using connection-mode sockets HOT 8
- FreeBSD nix::sys::event::Kqueue access to inner type HOT 4
- Add support for SCM_MONOTONIC as a control message for FreeBSD.
- Tracking Issue: Replace big `cfg!` chunks with shorter aliases
- Build failure for armv7-unknown-linux-uclibceabihf
- Enable most macos functions on all of apple_targets HOT 2
- Consider depending on the libc crate from its git repo HOT 1
- `poll` / `PollFd` can no longer take `-1` as descriptors HOT 9
- listen does not allow specifying a negative backlog HOT 4
- Consider using a command runner to wrap the commonly used commands HOT 3
- Should O_DIRECTORY be excluded for solarish platforms? HOT 5
- request new release HOT 2
- Enable "Checking conditional compilation value at compile time" when it is stable? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix.