Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@

pub mod device;
mod hal;
mod queue;
/// Virtqueue implementation used by virtio device drivers.
pub mod queue;
pub mod transport;
mod volatile;

Expand Down Expand Up @@ -137,7 +138,7 @@

/// The number of pages required to store `size` bytes, rounded up to a whole number of pages.
fn pages(size: usize) -> usize {
(size + PAGE_SIZE - 1) / PAGE_SIZE

Check warning on line 141 in src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

manually reimplementing `div_ceil`

warning: manually reimplementing `div_ceil` --> src/lib.rs:141:5 | 141 | (size + PAGE_SIZE - 1) / PAGE_SIZE | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `size.div_ceil(PAGE_SIZE)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#manual_div_ceil = note: `#[warn(clippy::manual_div_ceil)]` on by default
}

// TODO: Use NonNull::slice_from_raw_parts once it is stable.
Expand Down
2 changes: 2 additions & 0 deletions src/transport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ pub enum DeviceType {
Pstore = 22,
IOMMU = 23,
Memory = 24,
FileSystem = 26,
}

impl From<u32> for DeviceType {
Expand Down Expand Up @@ -187,6 +188,7 @@ impl From<u32> for DeviceType {
22 => DeviceType::Pstore,
23 => DeviceType::IOMMU,
24 => DeviceType::Memory,
26 => DeviceType::FileSystem,
_ => DeviceType::Invalid,
}
}
Expand Down
Loading