Skip to content

Commit 5d57e13

Browse files
committed
chore: make Descriptor and set_avail_event public
These methods will be accessed by the next commit. Signed-off-by: Egor Lazarchuk <[email protected]>
1 parent 09b9330 commit 5d57e13

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/vmm/src/devices/virtio/queue.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ pub enum QueueError {
3838

3939
/// A virtio descriptor constraints with C representative.
4040
#[repr(C)]
41-
#[derive(Default, Clone, Copy)]
42-
struct Descriptor {
43-
addr: u64,
44-
len: u32,
45-
flags: u16,
46-
next: u16,
41+
#[derive(Debug, Default, Clone, Copy)]
42+
pub struct Descriptor {
43+
pub addr: u64,
44+
pub len: u32,
45+
pub flags: u16,
46+
pub next: u16,
4747
}
4848

4949
// SAFETY: `Descriptor` is a POD and contains no padding.
@@ -482,7 +482,7 @@ impl Queue {
482482
}
483483

484484
/// Helper method that writes `val` to the `avail_event` field of the used ring.
485-
fn set_avail_event<M: GuestMemory>(&mut self, val: u16, mem: &M) {
485+
pub fn set_avail_event<M: GuestMemory>(&mut self, val: u16, mem: &M) {
486486
debug_assert!(self.is_layout_valid(mem));
487487

488488
let avail_event_addr = self

0 commit comments

Comments
 (0)