Debian Codegraph @

agent/mibgroup/host/hr_storage.h

raw
1 /*
2 * Host Resources MIB - storage group interface - hr_storage.h
3 *
4 */
5 #ifndef _MIBGROUP_HRSTORAGE_H
6 #define _MIBGROUP_HRSTORAGE_H
7
8 config_require(hardware/memory);
9 /* config_require(host/hr_filesys) */
10
11 extern void init_hr_storage(void);
12 extern FindVarMethod var_hrstore;
13
14
15 #define HRS_TYPE_MBUF 1
16 #define HRS_TYPE_MEM 2
17 #define HRS_TYPE_SWAP 3
18 #define HRS_TYPE_FIXED_MAX 3 /* the largest fixed type */
19
20 #ifdef WIN32
21 /* linux-compatible values for fs type */
22 #define MSDOS_SUPER_MAGIC 0x4d44
23 #define NTFS_SUPER_MAGIC 0x5346544E
24
25 /* Define the statfs structure for Windows. */
26 struct win_statfs {
27 long f_type; /* type of filesystem */
28 long f_bsize; /* optimal transfer block size */
29 long f_blocks; /* total data blocks in file system */
30 long f_bfree; /* free blocks in fs */
31 long f_bavail; /* free blocks avail to non-superuser */
32 long f_files; /* total file nodes in file system */
33 long f_ffree; /* free file nodes in fs */
34 long f_fsid; /* file system id */
35 long f_namelen; /* maximum length of filenames */
36 long f_spare[6]; /* spare for later */
37 char f_driveletter[6];
38 };
39
40 static int win_statfs (const char *path, struct win_statfs *buf);
41 #endif /* WIN32*/
42
43 #endif /* _MIBGROUP_HRSTORAGE_H */