From: Andrew Deason Date: Wed, 31 Oct 2012 20:04:55 +0000 (-0500) Subject: afs: Make last_error always useful X-Git-Tag: upstream/1.8.0_pre1^2~1833 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=48b60478897e7cb22e9cc1adfa3b71c188572093;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index 5d40929cd..6dafb0176 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) {