microsoft/openvmm
Publicmirrored fromhttps://github.com/microsoft/openvmmAvailable
openhcl/kmsg_defs/src/lib.rs
34lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | //! Kmsg-related definitions shared by underhill_core and underhill_init. |
| 5 | |
| 6 | #![forbid(unsafe_code)] |
| 7 | |
| 8 | /// system is unusable |
| 9 | pub const LOGLEVEL_EMERG: u8 = 0; |
| 10 | /// action must be taken immediately |
| 11 | pub const LOGLEVEL_ALERT: u8 = 1; |
| 12 | /// critical conditions |
| 13 | pub const LOGLEVEL_CRIT: u8 = 2; |
| 14 | /// error conditions |
| 15 | pub const LOGLEVEL_ERR: u8 = 3; |
| 16 | /// warning conditions |
| 17 | pub const LOGLEVEL_WARNING: u8 = 4; |
| 18 | /// normal but significant condition |
| 19 | pub const LOGLEVEL_NOTICE: u8 = 5; |
| 20 | /// informational |
| 21 | pub const LOGLEVEL_INFO: u8 = 6; |
| 22 | /// debug-level messages |
| 23 | pub const LOGLEVEL_DEBUG: u8 = 7; |
| 24 | |
| 25 | /// The facility for kernel messages. |
| 26 | pub const KERNEL_FACILITY: u8 = 0; |
| 27 | |
| 28 | /// The message prefix for ttyprintk messages. |
| 29 | pub const TTYPRINK_PREFIX: &str = "[U] "; |
| 30 | |
| 31 | /// underhill_init user-mode log facility |
| 32 | pub const UNDERHILL_INIT_KMSG_FACILITY: u8 = 2; |
| 33 | /// underhill user-mode log facility |
| 34 | pub const UNDERHILL_KMSG_FACILITY: u8 = 3; |
| 35 | |