* Get Operating System information. * Returns an string allocated via malloc(). */
| 702 | * Returns an string allocated via malloc(). |
| 703 | */ |
| 704 | static 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 | |
| 719 | static dumpcap_out_t create_output(void) |
| 720 | { |
no test coverage detected