From 48b60478897e7cb22e9cc1adfa3b71c188572093 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Wed, 31 Oct 2012 15:04:55 -0500 Subject: [PATCH] afs: Make last_error always useful Currently we record last_error as the last getuerror() we got when failing to read in a slot in UFSGetDSlot. For kernels that do not have getuerror(), this variable is currently useless, and we do not record anywhere what the last error received was (besides logging it via afs_warn). So, for non-uerror, just record what 'code' we got, so we at least have something. Change-Id: Iede39bbeee48ea48f380b788f2968886a831a918 Reviewed-on: http://gerrit.openafs.org/8369 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- src/afs/afs_dcache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index 5d40929..6dafb01 100644 --- a/src/afs/afs_dcache.c +++ b/src/afs/afs_dcache.c @@ -2755,6 +2755,8 @@ afs_UFSGetDSlot(afs_int32 aslot, int needvalid) entryok = 0; #if defined(KERNEL_HAVE_UERROR) last_error = getuerror(); +#else + last_error = code; #endif lasterrtime = osi_Time(); if (needvalid) { -- 1.9.4