summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d32581d)
raw | patch | inline | side by side (parent: d32581d)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 9 Dec 2007 14:30:29 +0000 (15:30 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 9 Dec 2007 14:30:29 +0000 (15:30 +0100) |
src/disk.c | patch | blob | history |
diff --git a/src/disk.c b/src/disk.c
index 490da07ae56098e2e438a835e8e4a72b1c9c110d..d2e9f9873ea71025a4185f6652b918474c5b0ddb 100644 (file)
--- a/src/disk.c
+++ b/src/disk.c
int disk_minor;
char disk_name[64];
- static complain_t complain_obj;
-
/* Get the list of all disk objects. */
if (IOServiceGetMatchingServices (io_master_port,
IOServiceMatching (kIOBlockStorageDriverClass),
&disk_list) != kIOReturnSuccess)
{
- plugin_complain (LOG_ERR, &complain_obj, "disk plugin: "
- "IOServiceGetMatchingServices failed.");
+ ERROR ("disk plugin: IOServiceGetMatchingServices failed.");
return (-1);
}
- else if (complain_obj.interval != 0)
- {
- plugin_relief (LOG_NOTICE, &complain_obj, "disk plugin: "
- "IOServiceGetMatchingServices succeeded.");
- }
while ((disk = IOIteratorNext (disk_list)) != 0)
{
diskstats_t *ds, *pre_ds;
- static complain_t complain_obj;
-
if ((fh = fopen ("/proc/diskstats", "r")) == NULL)
{
- if ((fh = fopen ("/proc/partitions", "r")) == NULL)
+ fh = fopen ("/proc/partitions", "r");
+ if (fh == NULL)
{
- plugin_complain (LOG_ERR, &complain_obj,
- "disk plugin: Failed to open /proc/"
- "{diskstats,partitions}.");
+ ERROR ("disk plugin: fopen (/proc/{diskstats,partitions}) failed.");
return (-1);
}
fieldshift = 1;
}
- plugin_relief (LOG_NOTICE, &complain_obj, "disk plugin: "
- "Succeeded to open /proc/{diskstats,partitions}.");
-
while (fgets (buffer, sizeof (buffer), fh) != NULL)
{
char *disk_name;