*** diskspace.c 2013-11-06 14:47:54.472774566 +0100 --- moddiskspace.c 2013-11-06 14:30:17.000000000 +0100 *************** *** 69,74 **** --- 69,83 ---- DWORD dwSize; size_t sz; struct zbx_json j; + static const TCHAR *drive_type[] = { + L"UNKNOWN_DRIVE", + L"INVALID_ROOT_DRIVE", + L"REMOVABLE_DRIVE", + L"FIXED_DRIVE", + L"NETWORK_DRIVE", + L"CDROM_DRIVE", + L"RAM_DRIVE"}; + /* Make an initial call to GetLogicalDriveStrings to get the necessary size into the dwSize variable */ *************** *** 102,107 **** --- 111,120 ---- zbx_json_addstring(&j, "{#FSNAME}", utf8, ZBX_JSON_TYPE_STRING); zbx_free(utf8); + utf8 = zbx_unicode_to_utf8(drive_type[GetDriveType(p)]); + zbx_json_addstring(&j, "{#DRTYPE}", utf8, ZBX_JSON_TYPE_STRING); + zbx_free(utf8); + if (TRUE == GetVolumeInformation(p, NULL, 0, NULL, NULL, NULL, fsName, sizeof(fsName) / sizeof(TCHAR))) { utf8 = zbx_unicode_to_utf8(fsName);