mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
agent: update not accurate comments
This commit includes: - update comments that not matched the function name - file path with doubled slash Fixes: #922 Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
parent
291257c0df
commit
906b38441c
@ -125,7 +125,7 @@ lazy_static! {
|
||||
// type of storage driver.
|
||||
type StorageHandler = fn(&Logger, &Storage, Arc<Mutex<Sandbox>>) -> Result<String>;
|
||||
|
||||
// StorageHandlerList lists the supported drivers.
|
||||
// STORAGEHANDLERLIST lists the supported drivers.
|
||||
#[cfg_attr(rustfmt, rustfmt_skip)]
|
||||
lazy_static! {
|
||||
pub static ref STORAGEHANDLERLIST: HashMap<&'static str, StorageHandler> = {
|
||||
@ -510,7 +510,7 @@ pub fn get_mount_fs_type(mount_point: &str) -> Result<String> {
|
||||
get_mount_fs_type_from_file(PROC_MOUNTSTATS, mount_point)
|
||||
}
|
||||
|
||||
// get_mount_fs_type returns the FS type corresponding to the passed mount point and
|
||||
// get_mount_fs_type_from_file returns the FS type corresponding to the passed mount point and
|
||||
// any error ecountered.
|
||||
pub fn get_mount_fs_type_from_file(mount_file: &str, mount_point: &str) -> Result<String> {
|
||||
if mount_point == "" {
|
||||
@ -643,7 +643,7 @@ pub fn cgroups_mount(logger: &Logger, unified_cgroup_hierarchy: bool) -> Result<
|
||||
|
||||
// Enable memory hierarchical account.
|
||||
// For more information see https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt
|
||||
online_device("/sys/fs/cgroup/memory//memory.use_hierarchy")?;
|
||||
online_device("/sys/fs/cgroup/memory/memory.use_hierarchy")?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -654,8 +654,8 @@ pub fn remove_mounts(mounts: &Vec<String>) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// ensureDestinationExists will recursively create a given mountpoint. If directories
|
||||
// are created, their permissions are initialized to mountPerm
|
||||
// ensure_destination_exists will recursively create a given mountpoint. If directories
|
||||
// are created, their permissions are initialized to mountPerm(0755)
|
||||
fn ensure_destination_exists(destination: &str, fs_type: &str) -> Result<()> {
|
||||
let d = Path::new(destination);
|
||||
if !d.exists() {
|
||||
|
@ -75,7 +75,7 @@ impl Namespace {
|
||||
self
|
||||
}
|
||||
|
||||
// setup_persistent_ns creates persistent namespace without switching to it.
|
||||
// setup creates persistent namespace without switching to it.
|
||||
// Note, pid namespaces cannot be persisted.
|
||||
pub fn setup(mut self) -> Result<Self, String> {
|
||||
if let Err(err) = fs::create_dir_all(&self.persistent_ns_dir) {
|
||||
|
Loading…
Reference in New Issue
Block a user