MCPcopy Create free account
hub / github.com/Icinga/icinga2 / UnameHelper

Function UnameHelper

lib/base/utility.cpp:1607–1626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1605
1606#ifndef _WIN32
1607static String UnameHelper(char type)
1608{
1609 struct utsname name;
1610 uname(&name);
1611
1612 switch (type) {
1613 case 'm':
1614 return (char*)name.machine;
1615 case 'n':
1616 return (char*)name.nodename;
1617 case 'r':
1618 return (char*)name.release;
1619 case 's':
1620 return (char*)name.sysname;
1621 case 'v':
1622 return (char*)name.version;
1623 default:
1624 VERIFY(!"Invalid uname query.");
1625 }
1626}
1627#endif /* _WIN32 */
1628static bool ReleaseHelper(String *platformName, String *platformVersion)
1629{

Callers 3

GetPlatformKernelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected