]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: remove strewn around calls to blkid_init_debug()
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 21 Dec 2022 19:07:54 +0000 (19:07 +0000)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 21 Dec 2022 19:08:44 +0000 (19:08 +0000)
Now that we always initialize libblkid debugging when loading we don't
need them anymore.

libblkid/src/cache.c
libblkid/src/evaluate.c
libblkid/src/probe.c

index a7f2c95ffc1a18e2160489068540b03ae2751dac..5f598735b1d5223d2dc8aab00be978103e056cbe 100644 (file)
@@ -97,8 +97,6 @@ int blkid_get_cache(blkid_cache *ret_cache, const char *filename)
        if (!ret_cache)
                return -BLKID_ERR_PARAM;
 
-       blkid_init_debug(0);
-
        if (!(cache = calloc(1, sizeof(struct blkid_struct_cache))))
                return -BLKID_ERR_MEM;
 
index 8157a7cca63e6386c4b7efab414435a0f1be1894..cd2f3a377a59e9b4a664149cbb5a6ab61189facd 100644 (file)
@@ -236,9 +236,6 @@ char *blkid_evaluate_tag(const char *token, const char *value, blkid_cache *cach
        if (!token)
                return NULL;
 
-       if (!cache || !*cache)
-               blkid_init_debug(0);
-
        DBG(EVALUATE, ul_debug("evaluating  %s%s%s", token, value ? "=" : "",
                   value ? value : ""));
 
@@ -317,8 +314,6 @@ int main(int argc, char *argv[])
                return EXIT_FAILURE;
        }
 
-       blkid_init_debug(0);
-
        res = blkid_evaluate_spec(argv[1], &cache);
        if (res)
                printf("%s\n", res);
index 34d2646c0f055f679dac946855a81854958d8959..61c7a446802f62b66a4f7268e65d0d03e672f7ed 100644 (file)
@@ -139,7 +139,6 @@ blkid_probe blkid_new_probe(void)
        int i;
        blkid_probe pr;
 
-       blkid_init_debug(0);
        pr = calloc(1, sizeof(struct blkid_struct_probe));
        if (!pr)
                return NULL;