@@ -9,8 +9,8 @@ use std::str::FromStr;
99use crate :: core:: { DevId , Device , DeviceInfo , DmCookie , DmFlags , DmName , DmOptions , DmUuid , DM } ;
1010use crate :: result:: { DmError , DmResult , ErrorEnum } ;
1111use crate :: shared:: {
12- device_create, device_exists, device_match, get_status_line_fields , message , parse_device ,
13- parse_value, DmDevice , TargetLine , TargetParams , TargetTable , TargetTypeBuf ,
12+ device_create, device_exists, device_match, get_status , get_status_line_fields , message ,
13+ parse_device , parse_value, DmDevice , TargetLine , TargetParams , TargetTable , TargetTypeBuf ,
1414} ;
1515use crate :: thindevid:: ThinDevId ;
1616use crate :: thinpooldev:: ThinPoolDev ;
@@ -379,14 +379,7 @@ impl ThinDev {
379379 /// Get the current status of the thin device.
380380 pub fn status ( & self , dm : & DM ) -> DmResult < ThinStatus > {
381381 let ( _, table) = dm. table_status ( & DevId :: Name ( self . name ( ) ) , & DmOptions :: new ( ) ) ?;
382-
383- assert_eq ! (
384- table. len( ) ,
385- 1 ,
386- "Kernel must return 1 line table for thin status"
387- ) ;
388-
389- table. first ( ) . expect ( "assertion above holds" ) . 3 . parse ( )
382+ get_status ( & table) ?. parse ( )
390383 }
391384
392385 /// Set the table for the thin device's target
0 commit comments