SIGAR_DISK_STATS_NOTIMPL -> SIGAR_DISK_STATS_INIT

This commit is contained in:
Doug MacEachern 2007-11-07 06:44:57 +00:00
parent 2e6a1c1a20
commit 77a9528f91
7 changed files with 7 additions and 12 deletions

View File

@ -310,9 +310,6 @@ int sigar_group_name_get(sigar_t *sigar, int gid, char *buf, int buflen);
(disk)->service_time = SIGAR_FIELD_NOTIMPL; \
(disk)->snaptime = 0
#define SIGAR_DISK_STATS_NOTIMPL(fsusage) \
SIGAR_DISK_STATS_INIT(&fsusage->disk)
/* key used for filesystem (/) -> device (/dev/hda1) mapping */
/* and disk_usage cache for service_time */
#define SIGAR_FSDEV_ID(sb) \

View File

@ -1679,7 +1679,7 @@ int sigar_file_system_usage_get(sigar_t *sigar,
fsusage->disk_write_bytes = SIGAR_FIELD_NOTIMPL;
fsusage->disk_queue = SIGAR_FIELD_NOTIMPL;
#else
SIGAR_DISK_STATS_NOTIMPL(fsusage);
SIGAR_DISK_STATS_INIT(&fsusage->disk)
#endif
return SIGAR_OK;

View File

@ -612,7 +612,7 @@ int sigar_file_system_usage_get(sigar_t *sigar,
fsusage->free_files = buf.f_ffree;
fsusage->use_percent = sigar_file_system_usage_calc_used(sigar, fsusage);
SIGAR_DISK_STATS_NOTIMPL(fsusage);
SIGAR_DISK_STATS_INIT(&fsusage->disk)
if (!sigar->fsdev) {
if (create_fsdev_cache(sigar) != SIGAR_OK) {

View File

@ -341,7 +341,7 @@ int sigar_file_system_usage_get(sigar_t *sigar,
fsusage->free_files = buf.f_ffree;
fsusage->use_percent = sigar_file_system_usage_calc_used(sigar, fsusage);
SIGAR_DISK_STATS_NOTIMPL(fsusage);
SIGAR_DISK_STATS_INIT(&fsusage->disk)
return SIGAR_OK;
}

View File

@ -479,7 +479,7 @@ int sigar_file_system_usage_get(sigar_t *sigar,
fsusage->free_files = buf.f_ffree;
fsusage->use_percent = sigar_file_system_usage_calc_used(sigar, fsusage);
SIGAR_DISK_STATS_NOTIMPL(fsusage);
SIGAR_DISK_STATS_INIT(&fsusage->disk)
return SIGAR_OK;
}

View File

@ -204,7 +204,7 @@ int sigar_file_system_usage_get(sigar_t *sigar,
fsusage->used = -1;
fsusage->files = -1;
fsusage->free_files = -1;
SIGAR_DISK_STATS_NOTIMPL(fsusage);
SIGAR_DISK_STATS_INIT(&fsusage->disk)
return SIGAR_OK;
}

View File

@ -1791,6 +1791,8 @@ SIGAR_DECLARE(int) sigar_disk_usage_get(sigar_t *sigar,
PERF_COUNTER_DEFINITION *counter;
DWORD perf_offsets[PERF_IX_DISK_MAX];
SIGAR_DISK_STATS_INIT(disk);
if (!object) {
return err;
}
@ -1874,10 +1876,6 @@ sigar_file_system_usage_get(sigar_t *sigar,
status = sigar_disk_usage_get(sigar, dirname, &fsusage->disk);
if (status != SIGAR_OK) {
SIGAR_DISK_STATS_NOTIMPL(fsusage);
}
return SIGAR_OK;
}