mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-29 16:13:27 +00:00
Rename the methods in the interface of VirtioTransport
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
300403e3eb
commit
3cb7f5b721
@ -410,7 +410,7 @@ impl DeviceInner {
|
||||
/// Flushes any cached data from the guest to the persistent storage on the host.
|
||||
/// This will be ignored if the device doesn't support the `VIRTIO_BLK_F_FLUSH` feature.
|
||||
fn flush(&self, bio_request: BioRequest) {
|
||||
if self.transport.lock().device_features() & BlockFeatures::FLUSH.bits() == 0 {
|
||||
if self.transport.lock().read_device_features() & BlockFeatures::FLUSH.bits() == 0 {
|
||||
bio_request.bios().for_each(|bio| {
|
||||
bio.complete(BioStatus::Complete);
|
||||
});
|
||||
|
@ -51,7 +51,7 @@ impl NetworkDevice {
|
||||
pub fn init(mut transport: Box<dyn VirtioTransport>) -> Result<(), VirtioDeviceError> {
|
||||
let virtio_net_config = VirtioNetConfig::new(transport.as_mut());
|
||||
let features = NetworkFeatures::from_bits_truncate(Self::negotiate_features(
|
||||
transport.device_features(),
|
||||
transport.read_device_features(),
|
||||
));
|
||||
debug!("virtio_net_config = {:?}", virtio_net_config);
|
||||
debug!("features = {:?}", features);
|
||||
|
Reference in New Issue
Block a user