]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: (probe) add magic hint
authorThomas Weißschuh <thomas@t-8ch.de>
Sat, 30 Sep 2023 21:55:31 +0000 (23:55 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Sat, 30 Sep 2023 22:18:24 +0000 (00:18 +0200)
This hint can be used by the probing callback to make decision based on
the matched magic. This avoids a awkward memcmp() on the magic string.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
libblkid/src/blkidP.h

index fb91185d0b11064f255573f48f1bbe157fbbbb83..a02df7eb6f6ebfe4b80b193adbcfa629a309aa9b 100644 (file)
@@ -146,6 +146,7 @@ struct blkid_idmag
 {
        const char      *magic;         /* magic string */
        unsigned int    len;            /* length of magic */
+       unsigned int    hint;           /* hint for prober */
 
        const char      *hoff;          /* hint which contains byte offset to kboff */
        long            kboff;          /* kilobyte offset of superblock */