File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,13 @@ use std::os::unix::io::AsRawFd;
55use thiserror:: Error ;
66
77mod ioctl {
8- use nix:: { ioctl_none, ioctl_read_bad} ;
8+ use nix:: { ioctl_none, ioctl_read_bad, request_code_none } ;
99
10- ioctl_read_bad ! ( blksszget, 0x1268 , u64 ) ;
10+ ioctl_read_bad ! (
11+ blksszget,
12+ request_code_none!( 0x12 , 104 ) ,
13+ :: std:: os:: raw:: c_int
14+ ) ;
1115 ioctl_none ! ( blkrrpart, 0x12 , 95 ) ;
1216}
1317
@@ -50,7 +54,7 @@ pub fn reread_partition_table(file: &mut fs::File) -> Result<(), BlockError> {
5054}
5155
5256/// Makes an ioctl call to obtain the sector size of a block device
53- pub fn get_sector_size ( file : & mut fs:: File ) -> Result < u64 , BlockError > {
57+ pub fn get_sector_size ( file : & mut fs:: File ) -> Result < i32 , BlockError > {
5458 let metadata = file. metadata ( ) . map_err ( BlockError :: Metadata ) ?;
5559 let mut sector_size = 512 ;
5660
You can’t perform that action at this time.
0 commit comments