mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-24 13:37:51 +00:00
cgroups: Extend docstrings for run_into[_cmd]
This commit is contained in:
parent
e88c6880ab
commit
dbd12994fb
@ -373,6 +373,13 @@ class CgroupsModule(Module):
|
||||
return self.controllers[kind]
|
||||
|
||||
def run_into_cmd(self, cgroup, cmdline):
|
||||
"""
|
||||
Get the command to run a command into a given cgroup
|
||||
|
||||
:param cmdline: Commdand to be run into cgroup
|
||||
:param cgroup: Name of cgroup to run command into
|
||||
:returns: A command to run `cmdline` into `cgroup`
|
||||
"""
|
||||
return 'CGMOUNT={} {} cgroups_run_into {} {}'\
|
||||
.format(self.cgroup_root, self.target.shutils,
|
||||
cgroup, cmdline)
|
||||
@ -380,6 +387,10 @@ class CgroupsModule(Module):
|
||||
def run_into(self, cgroup, cmdline):
|
||||
"""
|
||||
Run the specified command into the specified CGroup
|
||||
|
||||
:param cmdline: Command to be run into cgroup
|
||||
:param cgroup: Name of cgroup to run command into
|
||||
:returns: Output of command.
|
||||
"""
|
||||
return self.target._execute_util(
|
||||
'CGMOUNT={} cgroups_run_into {} {}'\
|
||||
|
Loading…
x
Reference in New Issue
Block a user