summaryrefslogtreecommitdiffstats
path: root/plugins/t
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/t')
0 files changed, 0 insertions, 0 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 5fac4ea..f72841e 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -99,26 +99,45 @@ main (int argc, char **argv)
99 if (statfs (path, &buf) == -1) { 99 if (statfs (path, &buf) == -1) {
100 switch (errno) 100 switch (errno)
101 { 101 {
102#ifdef ENOTDIR
102 case ENOTDIR: 103 case ENOTDIR:
103 terminate (STATE_UNKNOWN, "A component of the path prefix is not a directory.\n"); 104 terminate (STATE_UNKNOWN, "A component of the path prefix is not a directory.\n");
105#endif
106#ifdef ENAMETOOLONG
104 case ENAMETOOLONG: 107 case ENAMETOOLONG:
105 terminate (STATE_UNKNOWN, "path is too long.\n"); 108 terminate (STATE_UNKNOWN, "path is too long.\n");
109#endif
110#ifdef ENOENT
106 case ENOENT: 111 case ENOENT:
107 terminate (STATE_UNKNOWN, "The file referred to by path does not exist.\n"); 112 terminate (STATE_UNKNOWN, "The file referred to by path does not exist.\n");
113#endif
114#ifdef EACCES
108 case EACCES: 115 case EACCES:
109 terminate (STATE_UNKNOWN, "Search permission is denied for a component of the path prefix of path.\n"); 116 terminate (STATE_UNKNOWN, "Search permission is denied for a component of the path prefix of path.\n");
117#endif
118#ifdef ELOOP
110 case ELOOP: 119 case ELOOP:
111 terminate (STATE_UNKNOWN, "Too many symbolic links were encountered in translating path.\n"); 120 terminate (STATE_UNKNOWN, "Too many symbolic links were encountered in translating path.\n");
121#endif
122#ifdef EFAULT
112 case EFAULT: 123 case EFAULT:
113 terminate (STATE_UNKNOWN, "Buf or path points to an invalid address.\n"); 124 terminate (STATE_UNKNOWN, "Buf or path points to an invalid address.\n");
125#endif
126#ifdef EIO
114 case EIO: 127 case EIO:
115 terminate (STATE_UNKNOWN, "An I/O error occurred while reading from or writing to the file system.\n"); 128 terminate (STATE_UNKNOWN, "An I/O error occurred while reading from or writing to the file system.\n");
129#endif
130#ifdef ENOMEM
116 case ENOMEM: 131 case ENOMEM:
117 terminate (STATE_UNKNOWN, "Insufficient kernel memory was available.\n"); 132 terminate (STATE_UNKNOWN, "Insufficient kernel memory was available.\n");
133#endif
134#ifdef ENOSYS
118 case ENOSYS: 135 case ENOSYS:
119 terminate (STATE_UNKNOWN, "The filesystem path is on does not support statfs.\n"); 136 terminate (STATE_UNKNOWN, "The filesystem path is on does not support statfs.\n");
137#endif
120 } 138 }
121 } 139 }
140
122 usp = (buf.f_blocks - buf.f_bavail) / buf.f_blocks; 141 usp = (buf.f_blocks - buf.f_bavail) / buf.f_blocks;
123 disk_result = check_disk (usp, buf.f_bavail); 142 disk_result = check_disk (usp, buf.f_bavail);
124 result = disk_result; 143 result = disk_result;