1
0
mirror of https://github.com/danog/libdvb.git synced 2024-11-26 20:04:39 +01:00
This commit is contained in:
Andrey Dyldin 2021-01-23 22:41:30 +02:00
parent 8915e44bab
commit 302887dc3d
2 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,10 @@ use {
ops::Range,
os::linux::fs::MetadataExt,
os::unix::{
fs::OpenOptionsExt,
fs::{
OpenOptionsExt,
FileTypeExt,
},
io::{
AsRawFd,
RawFd,
@ -233,10 +236,9 @@ impl FeDevice {
// dev-file metadata
let metadata = self.file.metadata().context("fe get device metadata")?;
let mode = metadata.st_mode();
ensure!(
(mode & ::libc::S_IFMT) == ::libc::S_IFCHR,
metadata.file_type().is_char_device(),
FeError::InvalidDeviceFormat
);

View File

@ -4,8 +4,6 @@ use {
mem,
},
libc,
crate::ioctl::{
IoctlInt,
io_none,
@ -510,7 +508,7 @@ pub struct DtvPropertyBuffer {
pub data: [u8; 32],
pub len: u32,
__reserved_1: [u32; 3],
__reserved_2: *mut libc::c_void,
__reserved_2: *mut std::ffi::c_void,
}