Skip to content

Commit

Permalink
fix build error without mpk
Browse files Browse the repository at this point in the history
  • Loading branch information
anti-entropy123 committed Jan 14, 2025
1 parent 059f43e commit ed4f775
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion libmsvisor/src/isolation/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ use std::mem::transmute;

use log::info;
use ms_hostcall::{
mpk::LIBOS_PKEY,
types::{FsImageFunc, IsolationID, MetricEvent, MetricFunc, NetdevName},
CommonHostCall, HostCallID,
};

#[cfg(feature = "enable_mpk")]
use crate::mpk;
#[cfg(feature = "enable_mpk")]
use ms_hostcall::mpk::LIBOS_PKEY;

use crate::{isolation::get_isol, logger};

Expand Down
13 changes: 6 additions & 7 deletions libmsvisor/src/isolation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ use anyhow::{anyhow, Ok};

use lazy_static::lazy_static;
use log::info;
use ms_hostcall::{
mpk::LIBOS_PKEY,
types::{
IsolationID as IsolID,
MetricEvent::{IsolBegin, IsolEnd, Mem},
ServiceName,
},
use ms_hostcall::types::{
IsolationID as IsolID,
MetricEvent::{IsolBegin, IsolEnd, Mem},
ServiceName,
};

#[cfg(feature = "enable_mpk")]
use crate::{mpk, mpk::must_init_all_pkeys};
#[cfg(feature = "enable_mpk")]
use ms_hostcall::mpk::LIBOS_PKEY;

use crate::{
logger,
Expand Down
2 changes: 1 addition & 1 deletion user/file_reader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ heapless = "0.8.0"
mpk = ["ms_std/mpk"]
pkey_per_func = ["mpk"]

default = ["pkey_per_func"]
default = []
2 changes: 1 addition & 1 deletion user/splitter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ heapless = "0.8.0"
[features]
mpk = ["ms_std/mpk"]
pkey_per_func = ["mpk"]
default = ["pkey_per_func"]
default = []

0 comments on commit ed4f775

Please sign in to comment.