MCPcopy Create free account
hub / github.com/git/git / get_uname_info

Function get_uname_info

version.c:82–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82int get_uname_info(struct strbuf *buf, unsigned int full)
83{
84 struct utsname uname_info;
85
86 if (uname(&uname_info)) {
87 strbuf_addf(buf, _("uname() failed with error '%s' (%d)\n"),
88 strerror(errno),
89 errno);
90 return -1;
91 }
92 if (full)
93 strbuf_addf(buf, "%s %s %s %s\n",
94 uname_info.sysname,
95 uname_info.release,
96 uname_info.version,
97 uname_info.machine);
98 else
99 strbuf_addf(buf, "%s\n", uname_info.sysname);
100 return 0;
101}

Callers 2

os_infoFunction · 0.85
get_system_infoFunction · 0.85

Calls 2

unameFunction · 0.85
strbuf_addfFunction · 0.85

Tested by

no test coverage detected