OSDN Git Service

blkid: Add support for probing exFAT
[android-x86/external-e2fsprogs.git] / lib / blkid / probe.c
index 6ff942d..cd8ada6 100644 (file)
 #include "uuid/uuid.h"
 #include "probe.h"
 
+extern int probe_exfat(struct blkid_probe *probe,
+                     struct blkid_magic *id __BLKID_ATTR((unused)),
+                     unsigned char *buf);
+
 static int figure_label_len(const unsigned char *label, int len)
 {
        const unsigned char *end = label + len - 1;
@@ -87,6 +91,11 @@ static unsigned char *get_buffer(struct blkid_probe *pr,
        }
 }
 
+unsigned char *blkid_probe_get_buffer(struct blkid_probe *pr,
+                         blkid_loff_t off, size_t len)
+{
+       return get_buffer(pr, off, len);
+}
 
 /*
  * This is a special case code to check for an MDRAID device.  We do
@@ -1392,6 +1401,7 @@ static struct blkid_magic type_array[] = {
 /*  type     kboff   sboff len  magic                  probe */
   { "oracleasm", 0,    32,  8, "ORCLDISK",             probe_oracleasm },
   { "ntfs",     0,      3,  8, "NTFS    ",             probe_ntfs },
+  { "exfat",    0,      3,  8, "EXFAT   ",             probe_exfat },
   { "jbd",      1,   0x38,  2, "\123\357",             probe_jbd },
   { "ext4dev",  1,   0x38,  2, "\123\357",             probe_ext4dev },
   { "ext4",     1,   0x38,  2, "\123\357",             probe_ext4 },