projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #3147 from rpv-tomsk/libvirt
[collectd.git]
/
src
/
multimeter.c
diff --git
a/src/multimeter.c
b/src/multimeter.c
index
fc69e02
..
5a7d5a2
100644
(file)
--- a/
src/multimeter.c
+++ b/
src/multimeter.c
@@
-24,8
+24,8
@@
#include "collectd.h"
#include "collectd.h"
-#include "common.h"
#include "plugin.h"
#include "plugin.h"
+#include "utils/common/common.h"
#if HAVE_TERMIOS_H && HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#if HAVE_TERMIOS_H && HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
@@
-46,9
+46,7
@@
static int multimeter_read_value(double *value) {
tcflush(fd, TCIFLUSH);
if (gettimeofday(&time_end, NULL) < 0) {
tcflush(fd, TCIFLUSH);
if (gettimeofday(&time_end, NULL) < 0) {
- char errbuf[1024];
- ERROR("multimeter plugin: gettimeofday failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("multimeter plugin: gettimeofday failed: %s", STRERRNO);
return -1;
}
time_end.tv_sec++;
return -1;
}
time_end.tv_sec++;
@@
-71,10
+69,9
@@
static int multimeter_read_value(double *value) {
FD_SET(fd, &rfds);
if (gettimeofday(&time_now, NULL) < 0) {
FD_SET(fd, &rfds);
if (gettimeofday(&time_now, NULL) < 0) {
- char errbuf[1024];
ERROR("multimeter plugin: "
"gettimeofday failed: %s",
ERROR("multimeter plugin: "
"gettimeofday failed: %s",
-
sstrerror(errno, errbuf, sizeof(errbuf))
);
+
STRERRNO
);
return -1;
}
if (timeval_cmp(time_end, time_now, &timeout) < 0)
return -1;
}
if (timeval_cmp(time_end, time_now, &timeout) < 0)
@@
-132,10
+129,9
@@
static int multimeter_read_value(double *value) {
continue;
} else /* status == -1 */
{
continue;
} else /* status == -1 */
{
- char errbuf[1024];
ERROR("multimeter plugin: "
"select failed: %s",
ERROR("multimeter plugin: "
"select failed: %s",
-
sstrerror(errno, errbuf, sizeof(errbuf))
);
+
STRERRNO
);
break;
}
}
break;
}
}