File tree Expand file tree Collapse file tree
devices/virtio/block/virtio Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ fn run(cli: Cli) -> Result<(), HelperError> {
146146
147147 let stripped_templates = template:: strip:: strip ( templates) ?;
148148
149- for ( path, template) in paths. into_iter ( ) . zip ( stripped_templates. into_iter ( ) ) {
149+ for ( path, template) in paths. into_iter ( ) . zip ( stripped_templates) {
150150 let path = utils:: add_suffix ( & path, & suffix) ;
151151 let template_json = serde_json:: to_string_pretty ( & template) ?;
152152 write ( path, template_json) ?;
Original file line number Diff line number Diff line change @@ -308,10 +308,8 @@ impl Request {
308308 return Err ( VirtioBlockError :: InvalidOffset ) ;
309309 }
310310 }
311- RequestType :: GetDeviceID => {
312- if req. data_len < VIRTIO_BLK_ID_BYTES {
313- return Err ( VirtioBlockError :: InvalidDataLength ) ;
314- }
311+ RequestType :: GetDeviceID if req. data_len < VIRTIO_BLK_ID_BYTES => {
312+ return Err ( VirtioBlockError :: InvalidDataLength ) ;
315313 }
316314 _ => { }
317315 }
Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ impl MultiThreadBase for FirecrackerTarget {
416416
417417 vmm. vm
418418 . guest_memory ( )
419- . read ( & mut data[ ..read_len] , GuestAddress ( gpa as u64 ) )
419+ . read ( & mut data[ ..read_len] , GuestAddress ( gpa) )
420420 . map_err ( |e| {
421421 error ! ( "Error reading memory {e:?} gpa is {gpa}" ) ;
422422 } ) ?;
You can’t perform that action at this time.
0 commit comments