microsoft/openvmm

Public

mirrored fromhttps://github.com/microsoft/openvmmAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
bddef9a42e9ca8c8cd4aad200fb1a03582592eed

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

openhcl/kmsg_defs/src/lib.rs

34lines · modepreview

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Kmsg-related definitions shared by underhill_core and underhill_init.

#![forbid(unsafe_code)]

/// system is unusable
pub const LOGLEVEL_EMERG: u8 = 0;
/// action must be taken immediately
pub const LOGLEVEL_ALERT: u8 = 1;
/// critical conditions
pub const LOGLEVEL_CRIT: u8 = 2;
/// error conditions
pub const LOGLEVEL_ERR: u8 = 3;
/// warning conditions
pub const LOGLEVEL_WARNING: u8 = 4;
/// normal but significant condition
pub const LOGLEVEL_NOTICE: u8 = 5;
/// informational
pub const LOGLEVEL_INFO: u8 = 6;
/// debug-level messages
pub const LOGLEVEL_DEBUG: u8 = 7;

/// The facility for kernel messages.
pub const KERNEL_FACILITY: u8 = 0;

/// The message prefix for ttyprintk messages.
pub const TTYPRINK_PREFIX: &str = "[U] ";

/// underhill_init user-mode log facility
pub const UNDERHILL_INIT_KMSG_FACILITY: u8 = 2;
/// underhill user-mode log facility
pub const UNDERHILL_KMSG_FACILITY: u8 = 3;