floppy_resources/
lib.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4//! Configuration types for the floppy controller.
5//!
6//! Resource-based instantiation of floppy controllers is not yet implemented;
7//! these types exist in anticipation of that work. The controller is currently
8//! instantiated directly as part of the chipset configuration.
9
10#![forbid(unsafe_code)]
11
12use mesh::MeshPayload;
13use vm_resource::Resource;
14use vm_resource::kind::DiskHandleKind;
15
16/// The configuration for a floppy disk.
17#[derive(Debug, MeshPayload)]
18pub struct FloppyDiskConfig {
19    /// The backing disk media.
20    pub disk_type: Resource<DiskHandleKind>,
21    /// Whether the disk is read-only.
22    pub read_only: bool,
23}
24
25/// The configuration for a floppy controller.
26#[derive(Debug, MeshPayload)]
27pub struct FloppyControllerConfig {
28    /// The floppy disks attached to the controller.
29    pub floppy_disks: Vec<FloppyDiskConfig>,
30}