diff --git a/src/tools/agent-ctl/Cargo.lock b/src/tools/agent-ctl/Cargo.lock index 24502253b8..76ffe58502 100644 --- a/src/tools/agent-ctl/Cargo.lock +++ b/src/tools/agent-ctl/Cargo.lock @@ -632,9 +632,8 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "cgroups-rs" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db7c2f5545da4c12c5701455d9471da5f07db52e49b9cccb4f5512226dd0836" +version = "0.3.5" +source = "git+https://github.com/kata-containers/cgroups-rs?rev=v0.3.5#de9625ff57d156967b5b2a637c2c41bb2366e39b" dependencies = [ "libc", "log", @@ -3762,6 +3761,7 @@ dependencies = [ "regex", "rlimit", "runtime-spec", + "safe-path", "scan_fmt", "scopeguard", "serde", diff --git a/src/tools/kata-ctl/src/ops/check_ops.rs b/src/tools/kata-ctl/src/ops/check_ops.rs index 8388637f1e..247e32cd7c 100644 --- a/src/tools/kata-ctl/src/ops/check_ops.rs +++ b/src/tools/kata-ctl/src/ops/check_ops.rs @@ -46,10 +46,7 @@ fn get_builtin_check_func(name: CheckType) -> Result { // This function is called from each 'kata-ctl check' argument section fn handle_builtin_check(check: CheckType, args: &str) -> Result<()> { - let f = match get_builtin_check_func(check) { - Ok(fp) => fp, - Err(e) => return Err(e), - }; + let f = get_builtin_check_func(check)?; f(args) }