]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-osi-probe-check-result-cope-with-enoent-20090115
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Thu, 15 Jan 2009 13:13:09 +0000 (13:13 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 15 Jan 2009 13:13:09 +0000 (13:13 +0000)
LICENSE IPL10

in order for probing to work right

(cherry picked from commit 86225b60147d58ca71063a72be02236df1257407)

src/afs/LINUX/osi_probe.c

index f661e9ea3aa0668c61aac3998166b446f06a843a..91b95f6fe3a58978794fc595d2e013c92cce6c29 100644 (file)
@@ -1210,14 +1210,14 @@ static void *try_harder(probectl *P, PROBETYPE *ptr, unsigned long datalen)
     if (probe_debug & 0x0001) {                                                              \
        printk("<7>osi_probe: %s = 0x%016lx %s\n", P->symbol, (unsigned long)(x), (m)); \
     }                                                                                      \
-    if ((x)) {                                                                             \
+    if ((x) && ((int)(x)) != -ENOENT) {                                                    \
        *method = (m);                                                                     \
         final_answer = (void *)(x);                                                        \
     }                                                                                      \
 } while (0)
 #else
 #define check_result(x,m) do {  \
-    if ((x)) {                  \
+    if ((x) && ((int)(x)) != -ENOENT) { \
         *method = (m);          \
         return (void *)(x);     \
     }                           \