device_types/
uevent.rs

1// Copyright (c) 2020 DDN. All rights reserved.
2// Use of this source code is governed by a MIT-style
3// license that can be found in the LICENSE file.
4
5use crate::DevicePath;
6use im::{OrdSet, Vector};
7use std::path::PathBuf;
8
9#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize, Clone)]
10#[serde(rename_all = "camelCase")]
11pub struct UEvent {
12    pub major: String,
13    pub minor: String,
14    pub seqnum: i64,
15    pub paths: OrdSet<DevicePath>,
16    pub devname: PathBuf,
17    pub devpath: PathBuf,
18    pub devtype: String,
19    pub vendor: Option<String>,
20    pub model: Option<String>,
21    pub serial: Option<String>,
22    pub fs_type: Option<String>,
23    pub fs_usage: Option<String>,
24    pub fs_uuid: Option<String>,
25    pub fs_label: Option<String>,
26    pub part_entry_number: Option<u64>,
27    pub part_entry_mm: Option<String>,
28    pub size: Option<u64>,
29    pub rotational: Option<bool>,
30    pub scsi80: Option<String>,
31    pub scsi83: Option<String>,
32    pub read_only: Option<bool>,
33    pub bios_boot: Option<bool>,
34    pub zfs_reserved: Option<bool>,
35    pub is_mpath: Option<bool>,
36    pub dm_slave_mms: Vector<String>,
37    pub dm_vg_size: Option<u64>,
38    pub md_devs: OrdSet<DevicePath>,
39    pub dm_multipath_devpath: Option<bool>,
40    pub dm_name: Option<String>,
41    pub dm_lv_name: Option<String>,
42    pub lv_uuid: Option<String>,
43    pub dm_vg_name: Option<String>,
44    pub vg_uuid: Option<String>,
45    pub md_uuid: Option<String>,
46}