share FSDEV_ID macro

This commit is contained in:
Doug MacEachern committed 2007-10-09 21:53:34 +00:00
1 parent 8fb0941eca
commit 98157a49ce
5 files changed
+12 -17

No files matched your search

+2 -4
View File
@@ -560,8 +560,6 @@ int sigar_file_system_list_get(sigar_t *sigar,
#define SIGAR_FS_BLOCKS_TO_BYTES(buf, f) \
(((sigar_uint64_t)buf.f * (buf.f_bsize / 512)) >> 1)
#define FSDEV_ID(sb) (sb.st_ino + sb.st_dev)
static int create_fsdev_cache(sigar_t *sigar)
{
sigar_file_system_list_t fslist;
@@ -586,7 +584,7 @@ static int create_fsdev_cache(sigar_t *sigar)
continue;
}
ent = sigar_cache_get(sigar->fsdev, FSDEV_ID(sb));
ent = sigar_cache_get(sigar->fsdev, SIGAR_FSDEV_ID(sb));
ent->value = strdup(fsp->dev_name);
}
}
@@ -628,7 +626,7 @@ int sigar_file_system_usage_get(sigar_t *sigar,
char *devname;
int retval;
ent = sigar_cache_get(sigar->fsdev, FSDEV_ID(sb));
ent = sigar_cache_get(sigar->fsdev, SIGAR_FSDEV_ID(sb));
if (ent->value == NULL) {
return SIGAR_OK;
}