From: Karel Zak Date: Tue, 15 Sep 2009 19:42:07 +0000 (+0200) Subject: libblkid: move blkid_known_fstype() to superblocks.c X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8287d790f1b439213495e276d26696217f5d3151;p=util-linux libblkid: move blkid_known_fstype() to superblocks.c Signed-off-by: Karel Zak --- diff --git a/shlibs/blkid/src/probe.c b/shlibs/blkid/src/probe.c index a268161a..0dc70ebc 100644 --- a/shlibs/blkid/src/probe.c +++ b/shlibs/blkid/src/probe.c @@ -105,21 +105,6 @@ static const struct blkid_idinfo *idinfos[] = static int blkid_probe_set_usage(blkid_probe pr, int usage); -int blkid_known_fstype(const char *fstype) -{ - int i; - - if (!fstype) - return 0; - - for (i = 0; i < ARRAY_SIZE(idinfos); i++) { - const struct blkid_idinfo *id = idinfos[i]; - if (strcmp(id->name, fstype) == 0) - return 1; - } - return 0; -} - /* * Returns a pointer to the newly allocated probe struct */ diff --git a/shlibs/blkid/src/superblocks/superblocks.c b/shlibs/blkid/src/superblocks/superblocks.c index 31c601d4..acfd1522 100644 --- a/shlibs/blkid/src/superblocks/superblocks.c +++ b/shlibs/blkid/src/superblocks/superblocks.c @@ -149,6 +149,27 @@ const struct blkid_chaindrv superblocks_drv = { }; +/** + * blkid_known_fstype: + * @fstype: filesystem name + * + * Returns: 1 for known filesytems, or 0 for unknown filesystem. + */ +int blkid_known_fstype(const char *fstype) +{ + int i; + + if (!fstype) + return 0; + + for (i = 0; i < ARRAY_SIZE(idinfos); i++) { + const struct blkid_idinfo *id = idinfos[i]; + if (strcmp(id->name, fstype) == 0) + return 1; + } + return 0; +} + /* * The blkid_do_probe() backend. */