| 60 | |
| 61 | |
| 62 | Try<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 | |
| 80 | Try<Nothing> parseDefaultAction( |
no test coverage detected