map mib2 errmsg

This commit is contained in:
Doug MacEachern 2005-03-12 06:22:35 +00:00
parent b9144d1728
commit cd7c0dd425
2 changed files with 10 additions and 3 deletions

View File

@ -270,5 +270,7 @@ struct sigar_t {
#define HAVE_GETPWNAM_R
#define HAVE_GETPWUID_R
#define SIGAR_EMIB2 (SIGAR_OS_START_ERROR+1)
#endif /* SIGAR_OS_H */

View File

@ -145,7 +145,12 @@ int sigar_os_close(sigar_t *sigar)
char *sigar_os_error_string(sigar_t *sigar, int err)
{
switch (err) {
case SIGAR_EMIB2:
return sigar->mib2.errmsg;
default:
return NULL;
}
}
static SIGAR_INLINE int sigar_kstat_update(sigar_t *sigar)
@ -1499,7 +1504,7 @@ int sigar_net_route_list_get(sigar_t *sigar,
}
if (rc != GET_MIB2_EOD) {
/*XXX*/
return SIGAR_EMIB2;
}
return SIGAR_OK;
@ -1997,7 +2002,7 @@ int sigar_net_connection_list_get(sigar_t *sigar,
}
if (rc != GET_MIB2_EOD) {
/*XXX*/
return SIGAR_EMIB2;
}
return SIGAR_OK;