diff -Naur zabbix-3.4.11_origin/src/libs/zbxsysinfo/win32/diskspace.c zabbix-3.4.11_zbxnext_2755/src/libs/zbxsysinfo/win32/diskspace.c --- zabbix-3.4.11_origin/src/libs/zbxsysinfo/win32/diskspace.c 2018-06-25 11:57:00.000000000 +0300 +++ zabbix-3.4.11_zbxnext_2755/src/libs/zbxsysinfo/win32/diskspace.c 2018-07-03 10:53:56.170692400 +0300 @@ -103,11 +103,12 @@ int VFS_FS_DISCOVERY(AGENT_REQUEST *request, AGENT_RESULT *result) { wchar_t fsName[MAX_PATH + 1]; + wchar_t fsLabel[MAX_PATH + 1]; wchar_t *buffer = NULL, *p; char *utf8; DWORD dwSize; size_t sz; - struct zbx_json j; + struct zbx_json j; /* Make an initial call to GetLogicalDriveStrings to get the necessary size into the dwSize variable */ @@ -144,7 +145,8 @@ zbx_json_addstring(&j, "{#FSNAME}", utf8, ZBX_JSON_TYPE_STRING); zbx_free(utf8); - + + /* Filesystem type */ if (TRUE == GetVolumeInformation(p, NULL, 0, NULL, NULL, NULL, fsName, ARRSIZE(fsName))) { utf8 = zbx_unicode_to_utf8(fsName); @@ -153,6 +155,14 @@ } else zbx_json_addstring(&j, "{#FSTYPE}", "UNKNOWN", ZBX_JSON_TYPE_STRING); + zbx_free(utf8); + + /* Filesystem label */ + if (TRUE == GetVolumeInformation(p, fsLabel, ARRSIZE(fsLabel), NULL, NULL, NULL, NULL, NULL)) { + utf8 = zbx_unicode_to_utf8(fsLabel); + zbx_json_addstring(&j, "{#FSLABEL}", utf8, ZBX_JSON_TYPE_STRING); + zbx_free(utf8); + } zbx_json_addstring(&j, "{#FSDRIVETYPE}", get_drive_type_string(GetDriveType(p)), ZBX_JSON_TYPE_STRING);