From aa2fe8ccbfcb117efa207d10229eeeac5d0f97c7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 Feb 2023 17:11:30 +0100 Subject: Adding upstream version 1.38.0. Signed-off-by: Daniel Baumann --- collectors/macos.plugin/macos_fw.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'collectors/macos.plugin/macos_fw.c') diff --git a/collectors/macos.plugin/macos_fw.c b/collectors/macos.plugin/macos_fw.c index 07f7d773d..ca06f428e 100644 --- a/collectors/macos.plugin/macos_fw.c +++ b/collectors/macos.plugin/macos_fw.c @@ -84,14 +84,14 @@ int do_macos_iokit(int update_every, usec_t dt) { /* Get ports and services for drive statistics. */ if (unlikely(IOMainPort(bootstrap_port, &main_port))) { - error("MACOS: IOMasterPort() failed"); + collector_error("MACOS: IOMasterPort() failed"); do_io = 0; - error("DISABLED: system.io"); + collector_error("DISABLED: system.io"); /* Get the list of all drive objects. */ } else if (unlikely(IOServiceGetMatchingServices(main_port, IOServiceMatching("IOBlockStorageDriver"), &drive_list))) { - error("MACOS: IOServiceGetMatchingServices() failed"); + collector_error("MACOS: IOServiceGetMatchingServices() failed"); do_io = 0; - error("DISABLED: system.io"); + collector_error("DISABLED: system.io"); } else { while ((drive = IOIteratorNext(drive_list)) != 0) { properties = 0; @@ -126,9 +126,9 @@ int do_macos_iokit(int update_every, usec_t dt) { /* Obtain the properties for this drive object. */ if (unlikely(IORegistryEntryCreateCFProperties(drive, (CFMutableDictionaryRef *)&properties, kCFAllocatorDefault, 0))) { IOObjectRelease(drive); - error("MACOS: IORegistryEntryCreateCFProperties() failed"); + collector_error("MACOS: IORegistryEntryCreateCFProperties() failed"); do_io = 0; - error("DISABLED: system.io"); + collector_error("DISABLED: system.io"); break; } else if (likely(properties)) { /* Obtain the statistics from the drive properties. */ @@ -413,11 +413,11 @@ int do_macos_iokit(int update_every, usec_t dt) { if (likely(do_space || do_inodes)) { // there is no mount info in sysctl MIBs if (unlikely(!(mntsize = getmntinfo(&mntbuf, MNT_NOWAIT)))) { - error("MACOS: getmntinfo() failed"); + collector_error("MACOS: getmntinfo() failed"); do_space = 0; - error("DISABLED: disk_space.X"); + collector_error("DISABLED: disk_space.X"); do_inodes = 0; - error("DISABLED: disk_inodes.X"); + collector_error("DISABLED: disk_inodes.X"); } else { for (i = 0; i < mntsize; i++) { if (mntbuf[i].f_flags == MNT_RDONLY || @@ -500,9 +500,9 @@ int do_macos_iokit(int update_every, usec_t dt) { if (likely(do_bandwidth)) { if (unlikely(getifaddrs(&ifap))) { - error("MACOS: getifaddrs()"); + collector_error("MACOS: getifaddrs()"); do_bandwidth = 0; - error("DISABLED: system.ipv4"); + collector_error("DISABLED: system.ipv4"); } else { for (ifa = ifap; ifa; ifa = ifa->ifa_next) { if (ifa->ifa_addr->sa_family != AF_LINK) -- cgit v1.2.3