From b13b8dcbbb45e7b9612e86dd6c2669f8426b8080 Mon Sep 17 00:00:00 2001 From: nettag Date: Tue, 30 Jul 2013 16:22:40 +0300 Subject: [PATCH] Implemented empty sigar_proc_disk_io_get on unsupported systems, to avoid breaking compilation. --- bindings/SigarWrapper.pm | 4 ++-- src/os/aix/aix_sigar.c | 7 +++++++ src/os/darwin/darwin_sigar.c | 7 +++++++ src/os/hpux/hpux_sigar.c | 7 +++++++ src/os/solaris/solaris_sigar.c | 6 ++++++ 5 files changed, 29 insertions(+), 2 deletions(-) diff --git a/bindings/SigarWrapper.pm b/bindings/SigarWrapper.pm index ef9d1e5c..3fb33397 100644 --- a/bindings/SigarWrapper.pm +++ b/bindings/SigarWrapper.pm @@ -631,12 +631,12 @@ use vars qw(%classes %cmds); { name => 'bytes_read', type => 'Long', desc => 'Bytes Read', - plat => 'L' + plat => 'LW' }, { name => 'bytes_written', type => 'Long', desc => 'Bytes Written', - plat => 'L' + plat => 'LW' } ], ProcState => [ diff --git a/src/os/aix/aix_sigar.c b/src/os/aix/aix_sigar.c index a4c0a88d..7f58b58e 100644 --- a/src/os/aix/aix_sigar.c +++ b/src/os/aix/aix_sigar.c @@ -754,6 +754,13 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid, return SIGAR_OK; } +int sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid, + sigar_proc_disk_io_t *proc_disk_io) +{ + return SIGAR_ENOTIMPL; +} + + int sigar_proc_cred_get(sigar_t *sigar, sigar_pid_t pid, sigar_proc_cred_t *proccred) { diff --git a/src/os/darwin/darwin_sigar.c b/src/os/darwin/darwin_sigar.c index 0e154b09..8a80cd8f 100644 --- a/src/os/darwin/darwin_sigar.c +++ b/src/os/darwin/darwin_sigar.c @@ -1241,6 +1241,13 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid, return SIGAR_OK; } +int sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid, + sigar_proc_disk_io_t *proc_disk_io) +{ + return SIGAR_ENOTIMPL; +} + + int sigar_proc_cred_get(sigar_t *sigar, sigar_pid_t pid, sigar_proc_cred_t *proccred) { diff --git a/src/os/hpux/hpux_sigar.c b/src/os/hpux/hpux_sigar.c index f7a7adce..d362b04e 100644 --- a/src/os/hpux/hpux_sigar.c +++ b/src/os/hpux/hpux_sigar.c @@ -307,6 +307,13 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid, return SIGAR_OK; } +int sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid, + sigar_proc_disk_io_t *proc_disk_io) +{ + return SIGAR_ENOTIMPL; +} + + int sigar_proc_cred_get(sigar_t *sigar, sigar_pid_t pid, sigar_proc_cred_t *proccred) { diff --git a/src/os/solaris/solaris_sigar.c b/src/os/solaris/solaris_sigar.c index da9a2b63..8e8726e0 100644 --- a/src/os/solaris/solaris_sigar.c +++ b/src/os/solaris/solaris_sigar.c @@ -719,6 +719,12 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid, return SIGAR_OK; } +int sigar_proc_disk_io_get(sigar_t *sigar, sigar_pid_t pid, + sigar_proc_disk_io_t *proc_disk_io) +{ + return SIGAR_ENOTIMPL; +} + int sigar_proc_cred_get(sigar_t *sigar, sigar_pid_t pid, sigar_proc_cred_t *proccred) {