osi-probe-check-result-cope-with-enoent-20090115
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Thu, 15 Jan 2009 13:12:58 +0000 (13:12 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 15 Jan 2009 13:12:58 +0000 (13:12 +0000)
LICENSE IPL10

in order for probing to work right

src/afs/LINUX/osi_probe.c

index f661e9e..91b95f6 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);     \
     }                           \