(SIGAR-164) return ENXIO instead of ENOENT in disk_usage linux impl
This commit is contained in:
parent
9e699babc5
commit
90c2b19127
|
@ -1159,7 +1159,7 @@ static int get_iostat_sys(sigar_t *sigar,
|
||||||
int partition, status;
|
int partition, status;
|
||||||
|
|
||||||
if (!(*iodev = sigar_iodev_get(sigar, dirname))) {
|
if (!(*iodev = sigar_iodev_get(sigar, dirname))) {
|
||||||
return ENOENT;
|
return ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
name = fsdev = (*iodev)->name;
|
name = fsdev = (*iodev)->name;
|
||||||
|
@ -1211,7 +1211,7 @@ static int get_iostat_proc_dstat(sigar_t *sigar,
|
||||||
SIGAR_DISK_STATS_INIT(device_usage);
|
SIGAR_DISK_STATS_INIT(device_usage);
|
||||||
|
|
||||||
if (!(*iodev = sigar_iodev_get(sigar, dirname))) {
|
if (!(*iodev = sigar_iodev_get(sigar, dirname))) {
|
||||||
return ENOENT;
|
return ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stat((*iodev)->name, &sb) < 0) {
|
if (stat((*iodev)->name, &sb) < 0) {
|
||||||
|
@ -1313,7 +1313,7 @@ static int get_iostat_procp(sigar_t *sigar,
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
|
||||||
if (!(*iodev = sigar_iodev_get(sigar, dirname))) {
|
if (!(*iodev = sigar_iodev_get(sigar, dirname))) {
|
||||||
return ENOENT;
|
return ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stat((*iodev)->name, &sb) < 0) {
|
if (stat((*iodev)->name, &sb) < 0) {
|
||||||
|
|
Loading…
Reference in New Issue