struct tabmntent *mntlist;
if (listmntent(&mntlist, COLLECTD_MNTTAB, NULL, NULL) < 0) {
#if COLLECT_DEBUG
- char errbuf[1024];
- DEBUG("utils_mount: calling listmntent() failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ DEBUG("utils_mount: calling listmntent() failed: %s", STRERRNO);
#endif /* COLLECT_DEBUG */
}
/* Get the number of mounted file systems */
if ((bufsize = CMD_STATFS(NULL, 0, FLAGS_STATFS)) < 1) {
#if COLLECT_DEBUG
- char errbuf[1024];
- DEBUG("utils_mount: getv?fsstat failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ DEBUG("utils_mount: getv?fsstat failed: %s", STRERRNO);
#endif /* COLLECT_DEBUG */
return NULL;
}
if ((num = CMD_STATFS(buf, bufsize * sizeof(STRUCT_STATFS), FLAGS_STATFS)) <
1) {
#if COLLECT_DEBUG
- char errbuf[1024];
- DEBUG("utils_mount: getv?fsstat failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ DEBUG("utils_mount: getv?fsstat failed: %s", STRERRNO);
#endif /* COLLECT_DEBUG */
free(buf);
return NULL;
DEBUG("utils_mount: (void); COLLECTD_MNTTAB = %s", COLLECTD_MNTTAB);
if ((fp = fopen(COLLECTD_MNTTAB, "r")) == NULL) {
- char errbuf[1024];
- ERROR("fopen (%s): %s", COLLECTD_MNTTAB,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("fopen (%s): %s", COLLECTD_MNTTAB, STRERRNO);
return NULL;
}
return first;
} /* static cu_mount_t *cu_mount_gen_getmntent (void) */
- /* #endif HAVE_TWO_GETMNTENT || HAVE_GEN_GETMNTENT || HAVE_SUN_GETMNTENT */
#elif HAVE_SEQ_GETMNTENT
#warn "This version of `getmntent' hat not yet been implemented!"
DEBUG("utils_mount: (void); COLLECTD_MNTTAB = %s", COLLECTD_MNTTAB);
if ((fp = setmntent(COLLECTD_MNTTAB, "r")) == NULL) {
- char errbuf[1024];
- ERROR("setmntent (%s): %s", COLLECTD_MNTTAB,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("setmntent (%s): %s", COLLECTD_MNTTAB, STRERRNO);
return NULL;
}
DEBUG("utils_mount: (void); COLLECTD_MNTTAB = %s", COLLECTD_MNTTAB);
if ((fp = setmntent(COLLECTD_MNTTAB, "r")) == NULL) {
- char errbuf[1024];
- ERROR("setmntent (%s): %s", COLLECTD_MNTTAB,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("setmntent (%s): %s", COLLECTD_MNTTAB, STRERRNO);
return NULL;
}