From 8287d790f1b439213495e276d26696217f5d3151 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 15 Sep 2009 21:42:07 +0200 Subject: [PATCH] libblkid: move blkid_known_fstype() to superblocks.c Signed-off-by: Karel Zak --- shlibs/blkid/src/probe.c | 15 --------------- shlibs/blkid/src/superblocks/superblocks.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 15 deletions(-) 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. */ -- 2.39.5