]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
probe.c (blkid_known_fstype): New function which returns true if
authorTheodore Ts'o <tytso@mit.edu>
Mon, 21 Jul 2003 23:42:19 +0000 (19:42 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 21 Jul 2003 23:42:19 +0000 (19:42 -0400)
the filesystem type is one which this blkid library supports.

lib/blkid/ChangeLog
lib/blkid/blkid.h
lib/blkid/probe.c

index 69763939720e48c0128dda9420100170d4424195..2d01b919dbf51a6b21854a25e9678b9c27918720 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-21  Theodore Ts'o  <tytso@mit.edu>
+
+       * probe.c (blkid_known_fstype): New function which returns true if
+               the filesystem type is one which this blkid library supports.
+
 2003-07-20  Theodore Ts'o  <tytso@mit.edu>
 
        * probe.c: When revalidating a filesystem, delete the LABEL tag if
index 83e070faf4a093e68877a9238766e605397c9a7a..2c80fdf1ba3a7efc4e7e62e718ff10d9da3d24c4 100644 (file)
@@ -69,6 +69,9 @@ extern blkid_dev blkid_get_dev(blkid_cache cache, const char *devname,
 /* getsize.c */
 extern blkid_loff_t blkid_get_dev_size(int fd);
 
+/* probe.c */
+int blkid_known_fstype(const char *fstype);
+
 /* read.c */
 
 /* resolve.c */
index 1899e67f5da175cac2386cf98ddb1d4d70be3893..2421fff19c06025e7a180359cd359ed68839613c 100644 (file)
@@ -437,6 +437,17 @@ found_type:
        return dev;
 }
 
+int blkid_known_fstype(const char *fstype)
+{
+       struct blkid_magic *id;
+
+       for (id = type_array; id->bim_type; id++) {
+               if (strcmp(fstype, id->bim_type) == 0)
+                       return 1;
+       }
+       return 0;
+}
+
 #ifdef TEST_PROGRAM
 int main(int argc, char **argv)
 {