MCPcopy Create free account
hub / github.com/apache/mesos / list

Function list

src/linux/cgroups.cpp:2846–2870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2844
2845
2846Try<vector<Entry>> list(
2847 const string& hierarchy,
2848 const string& cgroup)
2849{
2850 Try<string> read = cgroups::read(hierarchy, cgroup, "devices.list");
2851
2852 if (read.isError()) {
2853 return Error("Failed to read from 'devices.list': " + read.error());
2854 }
2855
2856 vector<Entry> entries;
2857
2858 foreach (const string& s, strings::tokenize(read.get(), "\n")) {
2859 Try<Entry> entry = Entry::parse(s);
2860
2861 if (entry.isError()) {
2862 return Error("Failed to parse device entry '" + s + "'"
2863 " from 'devices.list': " + entry.error());
2864 }
2865
2866 entries.push_back(entry.get());
2867 }
2868
2869 return entries;
2870}
2871
2872
2873Try<Nothing> allow(

Callers 15

format_commands_helpFunction · 0.50
format_subcommands_helpFunction · 0.50
__getitem__Method · 0.50
__autocomplete_base__Method · 0.50
autocompleteFunction · 0.50
mainFunction · 0.50
foreachFunction · 0.50
SetUpTestCaseMethod · 0.50
TEST_PFunction · 0.50
TEST_FFunction · 0.50
getContainerPathsFunction · 0.50
getFrameworkPathsFunction · 0.50

Calls 6

readFunction · 0.70
parseFunction · 0.70
errorMethod · 0.65
ErrorFunction · 0.50
isErrorMethod · 0.45
getMethod · 0.45

Tested by 4

SetUpTestCaseMethod · 0.40
TEST_PFunction · 0.40
TEST_FFunction · 0.40
TestCSIPluginMethod · 0.40