mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Expose the path of controllers for chown
This commit is contained in:
committed by
Levente Kurusa
parent
3b9d4a8c2a
commit
3413b7d847
@@ -169,6 +169,9 @@ pub trait Controller {
|
||||
#[doc(hidden)]
|
||||
fn control_type(&self) -> Controllers;
|
||||
|
||||
/// The file system path to the controller.
|
||||
fn path(&self) -> &Path;
|
||||
|
||||
/// Apply a set of resources to the Controller, invoking its internal functions to pass the
|
||||
/// kernel the information.
|
||||
fn apply(&self, res: &Resources) -> Result<()>;
|
||||
@@ -194,6 +197,10 @@ impl<T> Controller for T where T: ControllerInternal {
|
||||
ControllerInternal::control_type(self)
|
||||
}
|
||||
|
||||
fn path(&self) -> &Path {
|
||||
self.get_path()
|
||||
}
|
||||
|
||||
/// Apply a set of resources to the Controller, invoking its internal functions to pass the
|
||||
/// kernel the information.
|
||||
fn apply(&self, res: &Resources) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user