1 /* 2 ** Zabbix 3 ** Copyright (C) 2001-2021 Zabbix SIA 4 ** 5 ** This program is free software; you can redistribute it and/or modify 6 ** it under the terms of the GNU General Public License as published by 7 ** the Free Software Foundation; either version 2 of the License, or 8 ** (at your option) any later version. 9 ** 10 ** This program is distributed in the hope that it will be useful, 11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 ** GNU General Public License for more details. 14 ** 15 ** You should have received a copy of the GNU General Public License 16 ** along with this program; if not, write to the Free Software 17 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 **/ 19 20 #ifndef ZABBIX_SYSINFO_COMMON_DIR_H 21 #define ZABBIX_SYSINFO_COMMON_DIR_H 22 23 #include "sysinfo.h" 24 25 #define DISK_BLOCK_SIZE 512 /* 512-byte blocks */ 26 27 #define SIZE_MODE_APPARENT 0 /* bytes in file */ 28 #define SIZE_MODE_DISK 1 /* size on disk */ 29 30 #define TRAVERSAL_DEPTH_UNLIMITED -1 /* directory traversal depth is not limited */ 31 32 typedef struct 33 { 34 int depth; 35 char *path; 36 } zbx_directory_item_t; 37 38 typedef struct 39 { 40 zbx_uint64_t st_dev; /* device */ 41 zbx_uint64_t st_ino; /* file serial number */ 42 } zbx_file_descriptor_t; 43 44 int VFS_DIR_SIZE(AGENT_REQUEST *request, AGENT_RESULT *result); 45 int VFS_DIR_COUNT(AGENT_REQUEST *request, AGENT_RESULT *result); 46 47 #endif /* ZABBIX_SYSINFO_COMMON_DIR_H */ 48