diff options
Diffstat (limited to 'src/libs/zbxsysinfo/osf/system.c')
-rw-r--r-- | src/libs/zbxsysinfo/osf/system.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/zbxsysinfo/osf/system.c b/src/libs/zbxsysinfo/osf/system.c index ac58d08dcd9..849bd967c32 100644 --- a/src/libs/zbxsysinfo/osf/system.c +++ b/src/libs/zbxsysinfo/osf/system.c @@ -18,6 +18,7 @@ **/ #include "sysinfo.h" +#include "log.h" #ifdef HAVE_SYS_UTSNAME_H # include <sys/utsname.h> @@ -28,7 +29,10 @@ int SYSTEM_UNAME(AGENT_REQUEST *request, AGENT_RESULT *result) struct utsname name; if (-1 == uname(&name)) + { + SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot obtain system information: %s", zbx_strerror(errno))); return SYSINFO_RET_FAIL; + } SET_STR_RESULT(result, zbx_dsprintf(NULL, "%s %s %s %s %s", name.sysname, name.nodename, name.release, name.version, name.machine)); |