Whamcloud - gitweb
tag.c (blkid_find_dev_with_tag): If blkid_probe_all() returns an
authorTheodore Ts'o <tytso@mit.edu>
Fri, 18 Jul 2003 23:10:28 +0000 (19:10 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 18 Jul 2003 23:10:28 +0000 (19:10 -0400)
error, then reflect that error upwards; don't try again
(forever).  This prevents an infinite loop when /proc and
the /etc/blkid.tab file are not present.

lib/blkid/ChangeLog
lib/blkid/tag.c

index 45b75f8..7100db0 100644 (file)
@@ -1,3 +1,10 @@
+2003-07-18  Theodore Ts'o  <tytso@mit.edu>
+
+       * tag.c (blkid_find_dev_with_tag): If blkid_probe_all() returns an
+               error, then reflect that error upwards; don't try again
+               (forever).  This prevents an infinite loop when /proc and
+               the /etc/blkid.tab file are not present.
+
 2003-07-06  Theodore Ts'o  <tytso@mit.edu>
 
        * blkid_types.h.in: Fix gcc -Wall nitpicks (don't use #elsif)
index 7acf3a6..67cd374 100644 (file)
@@ -332,7 +332,8 @@ try_again:
        }
 
        if (!dev && !(cache->bic_flags & BLKID_BIC_FL_PROBED)) {
-               blkid_probe_all(cache);
+               if (blkid_probe_all(cache) < 0)
+                       return NULL;
                goto try_again;
        }
        return dev;