@@ -576,10 +576,10 @@ const VIRTIO_DEVICE_ID_BASE: u16 = 0x1040;
576576
577577fn get_class ( id : DeviceId ) -> ( u8 , u8 ) {
578578 match id {
579- DeviceId :: Net => ( 0x02 , 0x00 ) ,
580- DeviceId :: FileSystem => ( 0x01 , 0x80 ) ,
581- DeviceId :: Block => ( 0x01 , 0x00 ) ,
582- DeviceId :: Socket => ( 0x02 , 0x80 ) ,
579+ DeviceId :: NET => ( 0x02 , 0x00 ) ,
580+ DeviceId :: FILE_SYSTEM => ( 0x01 , 0x80 ) ,
581+ DeviceId :: BLOCK => ( 0x01 , 0x00 ) ,
582+ DeviceId :: SOCKET => ( 0x02 , 0x80 ) ,
583583 _ => ( 0xff , 0x00 ) ,
584584 }
585585}
@@ -690,14 +690,14 @@ where
690690 let mut header = DeviceHeader {
691691 common : CommonHeader {
692692 vendor : VIRTIO_VENDOR_ID ,
693- device : VIRTIO_DEVICE_ID_BASE + dev. id as u16 ,
693+ device : VIRTIO_DEVICE_ID_BASE + dev. id . raw ( ) ,
694694 revision : 0x1 ,
695695 header_type : HeaderType :: DEVICE ,
696696 class,
697697 subclass,
698698 ..Default :: default ( )
699699 } ,
700- subsystem : VIRTIO_DEVICE_ID_BASE + dev. id as u16 ,
700+ subsystem : VIRTIO_DEVICE_ID_BASE + dev. id . raw ( ) ,
701701 ..Default :: default ( )
702702 } ;
703703 let device_config = dev. device_config . clone ( ) ;
0 commit comments