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

Function parseProfile

src/linux/seccomp/seccomp_parser.cpp:502–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500
501
502Try<ContainerSeccompProfile> parseProfile(const string& path)
503{
504 Try<string> read = os::read(path);
505 if (read.isError()) {
506 return Error(
507 "Failed to read Seccomp profile file '" + path + "': " + read.error());
508 }
509
510 Try<ContainerSeccompProfile> profile = parseProfileData(read.get());
511 if (profile.isError()) {
512 return Error(
513 "Failed to parse Seccomp profile '" + path + "': " + profile.error());
514 }
515
516 return profile;
517}
518
519} // namespace seccomp {
520} // namespace internal {

Callers 2

createMethod · 0.85
prepareMethod · 0.85

Calls 6

parseProfileDataFunction · 0.85
errorMethod · 0.65
readFunction · 0.50
ErrorFunction · 0.50
isErrorMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected