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

Function kernelVersion

src/common/kernel_version.cpp:31–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29namespace mesos {
30
31Try<Version> kernelVersion()
32{
33 Try<os::UTSInfo> uname = os::uname();
34 if (!uname.isSome()) {
35 return Error("Unable to determine kernel version: " + uname.error());
36 }
37
38 vector<string> parts = strings::split(uname->release, ".");
39 parts.resize(2);
40
41 Try<Version> version = Version::parse(strings::join(".", parts));
42 if (!version.isSome()) {
43 return Error("Failed to parse kernel version '" + uname->release +
44 "': " + version.error());
45 }
46
47 return version;
48}
49
50} // namespace mesos {

Callers 3

TEST_FFunction · 0.85
createMethod · 0.85
supportedFunction · 0.85

Calls 7

unameFunction · 0.85
splitFunction · 0.85
parseFunction · 0.70
errorMethod · 0.65
ErrorFunction · 0.50
joinFunction · 0.50
isSomeMethod · 0.45

Tested by 1

TEST_FFunction · 0.68