diff --git a/src/os/aix/aix_sigar.c b/src/os/aix/aix_sigar.c index 8bb19228..bac4491f 100644 --- a/src/os/aix/aix_sigar.c +++ b/src/os/aix/aix_sigar.c @@ -1247,7 +1247,7 @@ int sigar_disk_usage_get(sigar_t *sigar, const char *name, SIGAR_SSTRCPY(id.name, name); if (perfstat_disk(&id, &disk, sizeof(disk), 1) != 1) { - return ENOENT; + return ENXIO; } usage->reads = disk.rblks; diff --git a/src/os/darwin/darwin_sigar.c b/src/os/darwin/darwin_sigar.c index 9f79e8b6..b60e0af1 100644 --- a/src/os/darwin/darwin_sigar.c +++ b/src/os/darwin/darwin_sigar.c @@ -2137,7 +2137,7 @@ int sigar_disk_usage_get(sigar_t *sigar, const char *name, SIGAR_DISK_STATS_INIT(disk); if (!iodev) { - return ESRCH; + return ENXIO; } /* "/dev/disk0s1" -> "disk0" */ /* XXX better way? */ diff --git a/src/os/linux/linux_sigar.c b/src/os/linux/linux_sigar.c index 2f232ae1..a9325953 100644 --- a/src/os/linux/linux_sigar.c +++ b/src/os/linux/linux_sigar.c @@ -1159,7 +1159,7 @@ static int get_iostat_sys(sigar_t *sigar, int partition, status; if (!(*iodev = sigar_iodev_get(sigar, dirname))) { - return ENOENT; + return ENXIO; } name = fsdev = (*iodev)->name; @@ -1211,7 +1211,7 @@ static int get_iostat_proc_dstat(sigar_t *sigar, SIGAR_DISK_STATS_INIT(device_usage); if (!(*iodev = sigar_iodev_get(sigar, dirname))) { - return ENOENT; + return ENXIO; } if (stat((*iodev)->name, &sb) < 0) { @@ -1313,7 +1313,7 @@ static int get_iostat_procp(sigar_t *sigar, struct stat sb; if (!(*iodev = sigar_iodev_get(sigar, dirname))) { - return ENOENT; + return ENXIO; } if (stat((*iodev)->name, &sb) < 0) { diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index bc432961..d395afe7 100644 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -1956,7 +1956,7 @@ SIGAR_DECLARE(int) sigar_disk_usage_get(sigar_t *sigar, } } - return ENOENT; + return ENXIO; } SIGAR_DECLARE(int)