pub fn close(fd: c_int) -> Result<()>
Expand description
A convenience wrapper around v4l2_close.
In case of errors, the last OS error will be reported, aka errno on Linux.
§Arguments
fd
- File descriptor of a previously opened device
§Example
extern crate v4l;
use v4l::v4l2;
let fd = v4l2::open("/dev/video0", libc::O_RDWR);
if let Ok(fd) = fd {
v4l2::close(fd).unwrap();
}