MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_os_info

Function get_os_info

dpdk/app/dumpcap/main.c:704–717  ·  view source on GitHub ↗

* Get Operating System information. * Returns an string allocated via malloc(). */

Source from the content-addressed store, hash-verified

702 * Returns an string allocated via malloc().
703 */
704static char *get_os_info(void)
705{
706 struct utsname uts;
707 char *osname = NULL;
708
709 if (uname(&uts) < 0)
710 return NULL;
711
712 if (asprintf(&osname, "%s %s",
713 uts.sysname, uts.release) == -1)
714 return NULL;
715
716 return osname;
717}
718
719static dumpcap_out_t create_output(void)
720{

Callers 1

create_outputFunction · 0.85

Calls 2

unameFunction · 0.85
asprintfFunction · 0.85

Tested by

no test coverage detected