From bb80282ba95b23c85cc5f287ed174e37b4d374a7 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. Reviewed-on: http://gerrit.openafs.org/8369 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 48b60478897e7cb22e9cc1adfa3b71c188572093) Change-Id: I32a079934c8d3ecd3d7316cfc7eb8da01580a08e Reviewed-on: http://gerrit.openafs.org/9286 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand 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 cd96464eb..cd125408e 100644 --- a/src/afs/afs_dcache.c +++ b/src/afs/afs_dcache.c @@ -2766,6 +2766,8 @@ afs_UFSGetDSlot(afs_int32 aslot, int indexvalid, int datavalid) entryok = 0; #if defined(KERNEL_HAVE_UERROR) last_error = getuerror(); +#else + last_error = code; #endif lasterrtime = osi_Time(); if (indexvalid) { -- 2.39.5