1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Client definitions for describing floppy controller configuration.
//!
//! TODO: refactor to support `Resource`-based instantiation of floppy
//! controllers, at which point this crate name makes sense.

#![forbid(unsafe_code)]
#![warn(missing_docs)]

use mesh::MeshPayload;
use vm_resource::kind::DiskHandleKind;
use vm_resource::Resource;

/// The configuration for a floppy disk.
#[derive(Debug, MeshPayload)]
pub struct FloppyDiskConfig {
    /// The backing disk media.
    pub disk_type: Resource<DiskHandleKind>,
    /// Whether the disk is read-only.
    pub read_only: bool,
}

/// The configuration for a floppy controller.
#[derive(Debug, MeshPayload)]
pub struct FloppyControllerConfig {
    /// The floppy disks attached to the controller.
    pub floppy_disks: Vec<FloppyDiskConfig>,
}