diff --git a/include/sigar.h b/include/sigar.h index b2266c6e..5355b87d 100644 --- a/include/sigar.h +++ b/include/sigar.h @@ -464,6 +464,10 @@ sigar_file_system_usage_get(sigar_t *sigar, const char *dirname, sigar_file_system_usage_t *fsusage); +SIGAR_DECLARE(int) sigar_disk_usage_get(sigar_t *sigar, + const char *name, + sigar_disk_usage_t *usage); + SIGAR_DECLARE(int) sigar_file_system_ping(sigar_t *sigar, sigar_file_system_t *fs); diff --git a/src/os/darwin/darwin_sigar.c b/src/os/darwin/darwin_sigar.c index 57d91add..8db2f7be 100644 --- a/src/os/darwin/darwin_sigar.c +++ b/src/os/darwin/darwin_sigar.c @@ -1535,6 +1535,12 @@ int sigar_file_system_list_get(sigar_t *sigar, return SIGAR_OK; } +int sigar_disk_usage_get(sigar_t *sigar, const char *name, + sigar_disk_usage_t *usage) +{ + return SIGAR_ENOTIMPL; +} + int sigar_file_system_usage_get(sigar_t *sigar, const char *dirname, sigar_file_system_usage_t *fsusage) diff --git a/src/os/hpux/hpux_sigar.c b/src/os/hpux/hpux_sigar.c index 3412fb0c..512fc9fe 100644 --- a/src/os/hpux/hpux_sigar.c +++ b/src/os/hpux/hpux_sigar.c @@ -592,6 +592,12 @@ static int create_fsdev_cache(sigar_t *sigar) return SIGAR_OK; } +int sigar_disk_usage_get(sigar_t *sigar, const char *name, + sigar_disk_usage_t *usage) +{ + return SIGAR_ENOTIMPL; +} + int sigar_file_system_usage_get(sigar_t *sigar, const char *dirname, sigar_file_system_usage_t *fsusage) diff --git a/src/os/linux/linux_sigar.c b/src/os/linux/linux_sigar.c index f3c8fdff..e50ae393 100644 --- a/src/os/linux/linux_sigar.c +++ b/src/os/linux/linux_sigar.c @@ -1508,8 +1508,8 @@ static int get_iostat_procp(sigar_t *sigar, return ENOENT; } -static int sigar_disk_usage_get(sigar_t *sigar, const char *name, - sigar_disk_usage_t *usage) +int sigar_disk_usage_get(sigar_t *sigar, const char *name, + sigar_disk_usage_t *usage) { SIGAR_DISK_STATS_NOTIMPL(usage); /* init */ diff --git a/src/os/netware/netware_sigar.c b/src/os/netware/netware_sigar.c index 7d1a9745..0cf1d229 100644 --- a/src/os/netware/netware_sigar.c +++ b/src/os/netware/netware_sigar.c @@ -314,6 +314,12 @@ int sigar_file_system_list_get(sigar_t *sigar, return SIGAR_OK; } +int sigar_disk_usage_get(sigar_t *sigar, const char *name, + sigar_disk_usage_t *usage) +{ + return SIGAR_ENOTIMPL; +} + #define SIGAR_FS_BLOCKS_TO_BYTES(buf, f) \ ((buf.f * (buf.f_bsize / 512)) >> 1) diff --git a/src/os/osf1/osf1_sigar.c b/src/os/osf1/osf1_sigar.c index 8f329ffd..922657e3 100644 --- a/src/os/osf1/osf1_sigar.c +++ b/src/os/osf1/osf1_sigar.c @@ -452,6 +452,12 @@ int sigar_file_system_list_get(sigar_t *sigar, return SIGAR_OK; } +int sigar_disk_usage_get(sigar_t *sigar, const char *name, + sigar_disk_usage_t *usage) +{ + return SIGAR_ENOTIMPL; +} + #define SIGAR_FS_BLOCKS_TO_BYTES(buf, f) \ (((sigar_uint64_t)buf.f * (buf.f_bsize / 512)) >> 1) diff --git a/src/os/stub/stub_sigar.c b/src/os/stub/stub_sigar.c index 0cde1c94..23fcc325 100644 --- a/src/os/stub/stub_sigar.c +++ b/src/os/stub/stub_sigar.c @@ -188,6 +188,12 @@ int sigar_file_system_list_get(sigar_t *sigar, return SIGAR_OK; } +int sigar_disk_usage_get(sigar_t *sigar, const char *name, + sigar_disk_usage_t *usage) +{ + return SIGAR_ENOTIMPL; +} + int sigar_file_system_usage_get(sigar_t *sigar, const char *dirname, sigar_file_system_usage_t *fsusage) diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index bd64a446..74f5bbcd 100644 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -1780,9 +1780,9 @@ static PERF_INSTANCE_DEFINITION *get_disk_instance(sigar_t *sigar, return PdhFirstInstance(object); } -static int sigar_disk_usage_get(sigar_t *sigar, - const char *dirname, - sigar_disk_usage_t *fsusage) +SIGAR_DECLARE(int) sigar_disk_usage_get(sigar_t *sigar, + const char *dirname, + sigar_disk_usage_t *fsusage) { DWORD i, err; PERF_OBJECT_TYPE *object =