This commit is contained in:
@@ -418,7 +418,7 @@ fn get_size_via_ioctl(path: &Path) -> Result<u64, WipeError> {
|
||||
let mut size: u64 = 0;
|
||||
// BLKGETSIZE64 = _IOR(0x12,114,size_t) => 0x80081272 on x86_64
|
||||
const BLKGETSIZE64: libc::c_ulong = 0x80081272;
|
||||
let ret = unsafe { libc::ioctl(fd, BLKGETSIZE64 as libc::c_ulong, &mut size as *mut u64) };
|
||||
let ret = unsafe { libc::ioctl(fd, BLKGETSIZE64 as _, &mut size as *mut u64 as *mut libc::c_void) };
|
||||
if ret == 0 {
|
||||
Ok(size)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user