aboutsummaryrefslogtreecommitdiff
path: root/lib/libmemstat/memstat_uma.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2006-02-11 18:55:03 +0000
committerRobert Watson <rwatson@FreeBSD.org>2006-02-11 18:55:03 +0000
commit59e012a852150773c74578be5473c9d96ca5187b (patch)
tree02a55a9bd23a20b4741e42e4a4e4643dcd98238a /lib/libmemstat/memstat_uma.c
parent3f374960e665d4f11bc668dd7d6436d00b3f0548 (diff)
downloadsrc-59e012a852150773c74578be5473c9d96ca5187b.tar.gz
src-59e012a852150773c74578be5473c9d96ca5187b.zip
When reporting an error reading from UMA per-cpu cache pointers using KVM,
return a KVM error rather than an out of memory error, so that the caller reports the KVM error state. This replaces a misleading error message with a more accurate although equally confusing one. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=155549
Diffstat (limited to 'lib/libmemstat/memstat_uma.c')
-rw-r--r--lib/libmemstat/memstat_uma.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libmemstat/memstat_uma.c b/lib/libmemstat/memstat_uma.c
index 924b7c252b0f..dfbf31cca76d 100644
--- a/lib/libmemstat/memstat_uma.c
+++ b/lib/libmemstat/memstat_uma.c
@@ -397,8 +397,7 @@ memstat_kvm_uma(struct memory_type_list *list, void *kvm_handle)
&ub, sizeof(ub), 0);
if (ret != 0) {
_memstat_mtl_empty(list);
- list->mtl_error =
- MEMSTAT_ERROR_NOMEMORY;
+ list->mtl_error = ret;
return (-1);
}
mtp->mt_free += ub.ub_cnt;
@@ -408,8 +407,7 @@ memstat_kvm_uma(struct memory_type_list *list, void *kvm_handle)
&ub, sizeof(ub), 0);
if (ret != 0) {
_memstat_mtl_empty(list);
- list->mtl_error =
- MEMSTAT_ERROR_NOMEMORY;
+ list->mtl_error = ret;
return (-1);
}
mtp->mt_free += ub.ub_cnt;