From 78e8d0adf0cc0e9660502987ca1b916f7e792f09 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Wed, 29 Sep 2021 12:41:41 +0200 Subject: [PATCH] Rename 'readdrivestat' function on v3 Signed-off-by: Pablo Baeyens --- v3/disk/disk_darwin_cgo.go | 2 +- v3/disk/iostat_darwin.c | 2 +- v3/disk/iostat_darwin.h | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/v3/disk/disk_darwin_cgo.go b/v3/disk/disk_darwin_cgo.go index 18ea590..fa3de37 100644 --- a/v3/disk/disk_darwin_cgo.go +++ b/v3/disk/disk_darwin_cgo.go @@ -19,7 +19,7 @@ import ( func IOCountersWithContext(ctx context.Context, names ...string) (map[string]IOCountersStat, error) { var buf [C.NDRIVE]C.DriveStats - n, err := C.readdrivestat(&buf[0], C.int(len(buf))) + n, err := C.v3readdrivestat(&buf[0], C.int(len(buf))) if err != nil { return nil, err } diff --git a/v3/disk/iostat_darwin.c b/v3/disk/iostat_darwin.c index 9619c6f..9cd2f60 100644 --- a/v3/disk/iostat_darwin.c +++ b/v3/disk/iostat_darwin.c @@ -16,7 +16,7 @@ static int getdrivestat(io_registry_entry_t d, DriveStats *stat); static int fillstat(io_registry_entry_t d, DriveStats *stat); int -readdrivestat(DriveStats a[], int n) +v3readdrivestat(DriveStats a[], int n) { mach_port_t port; CFMutableDictionaryRef match; diff --git a/v3/disk/iostat_darwin.h b/v3/disk/iostat_darwin.h index c720849..7706c53 100644 --- a/v3/disk/iostat_darwin.h +++ b/v3/disk/iostat_darwin.h @@ -29,5 +29,4 @@ struct CPUStats { natural_t idle; }; -extern int readdrivestat(DriveStats a[], int n); -extern int readcpustat(CPUStats *cpu); +extern int v3readdrivestat(DriveStats a[], int n);