]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: always initialize debugging
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 21 Dec 2022 19:06:01 +0000 (19:06 +0000)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 21 Dec 2022 19:08:43 +0000 (19:08 +0000)
Previously the debugging logic relied on random parts of libblkid having
called blkid_init_debug().
If this didn't happen, as for example for lsblk(8), debugging wouldn't
work.

Make sure that debugging is always enabled.

libblkid/src/init.c

index 6dc9ffd564d9d73e7d56c5c6fb16c7818f5a29a7..172225fafa1ee147298e3f304f87d9901f371d5a 100644 (file)
@@ -65,3 +65,8 @@ void blkid_init_debug(int mask)
        ON_DBG(HELP, ul_debug_print_masks("LIBBLKID_DEBUG",
                                UL_DEBUG_MASKNAMES(libblkid)));
 }
+
+static void __attribute__ ((constructor)) blkid_init_default_debug(void)
+{
+       blkid_init_debug(0);
+}