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

Function stringify

src/linux/ns.cpp:622–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620
621
622string stringify(int flags)
623{
624 const hashmap<unsigned int, string> names = {
625 {CLONE_NEWNS, "CLONE_NEWNS"},
626 {CLONE_NEWUTS, "CLONE_NEWUTS"},
627 {CLONE_NEWIPC, "CLONE_NEWIPC"},
628 {CLONE_NEWPID, "CLONE_NEWPID"},
629 {CLONE_NEWNET, "CLONE_NEWNET"},
630 {CLONE_NEWUSER, "CLONE_NEWUSER"},
631 {CLONE_NEWCGROUP, "CLONE_NEWCGROUP"}
632 };
633
634 vector<string> namespaces;
635 foreachpair (unsigned int flag, const string& name, names) {
636 if (flags & flag) {
637 namespaces.push_back(name);
638 }
639 }
640
641 return strings::join(" | ", namespaces);
642}
643
644} // namespace ns {

Callers 15

typeNameFunction · 0.70
readMethod · 0.70
sampleFunction · 0.70
parseMethod · 0.70
foreachFunction · 0.70
assignFunction · 0.70
_listenMethod · 0.70
__destroyFunction · 0.70
cgroupFunction · 0.70
sharesFunction · 0.70
cfs_period_usFunction · 0.70
cfs_quota_usFunction · 0.70

Calls 1

joinFunction · 0.50

Tested by 15

validateFunction · 0.40
CreateMasterFlagsMethod · 0.40
CreateSlaveFlagsMethod · 0.40
CgroupsFilterMethod · 0.40
launchContainerMethod · 0.40
initializeMethod · 0.40
createSlaveInfoMethod · 0.40
createFrameworkInfoMethod · 0.40
TEST_FFunction · 0.40
TEST_PFunction · 0.40
createLabelsFunction · 0.40
postMethod · 0.40