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

Function parseArchitecture

src/linux/seccomp/seccomp_parser.cpp:62–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61
62Try<ContainerSeccompProfile::Architecture> parseArchitecture(
63 const string& value)
64{
65 ContainerSeccompProfile::Architecture result;
66
67 if (!strings::startsWith(value, SCMP_PREFIX)) {
68 return Error("Unexpected architecture: '" + value + "'");
69 }
70
71 if (!ContainerSeccompProfile::Architecture_Parse(
72 string(value, strlen(SCMP_PREFIX)), &result)) {
73 return Error("Unknown architecture: '" + value + "'");
74 }
75
76 return std::move(result);
77}
78
79
80Try<Nothing> parseDefaultAction(

Callers 1

foreachFunction · 0.85

Calls 2

startsWithFunction · 0.85
ErrorFunction · 0.50

Tested by

no test coverage detected