]> err.no Git - util-linux/commitdiff
libblkid: support LIBBLKID_DEBUG= env.
authorKarel Zak <kzak@redhat.com>
Fri, 24 Dec 2010 00:10:42 +0000 (01:10 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 3 Jan 2011 11:28:48 +0000 (12:28 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/cache.c

index 6f53dc99aa57d7a93f530268b2e4cd42f5c935d9..feec6ddfceb8b66dedfe542f84a94a630a7e9dfe 100644 (file)
@@ -79,8 +79,10 @@ void blkid_init_debug(int mask)
 
        if (!mask)
        {
-               char *dstr = getenv("BLKID_DEBUG");
+               char *dstr = getenv("LIBBLKID_DEBUG");
 
+               if (!dstr)
+                       dstr = getenv("BLKID_DEBUG");   /* for backward compatibility */
                if (dstr)
                        blkid_debug_mask = strtoul(dstr, 0, 0);
        } else