]> err.no Git - util-linux/commitdiff
libblkid: add a probe for bfs
authorChristoph Hellwig <hch@infradead.org>
Tue, 6 Oct 2009 18:10:31 +0000 (14:10 -0400)
committerKarel Zak <kzak@redhat.com>
Tue, 6 Oct 2009 20:02:13 +0000 (22:02 +0200)
blkid is currently missing a probe for the bfs filesystem, leading
to a blkid-enable xfsprogs failing xfsqa testcase 032. This patch adds
a trivial probe for the magic.

Signed-off-by: Christoph Hellwig <hch@lst.de>
shlibs/blkid/src/superblocks/Makefile.am
shlibs/blkid/src/superblocks/bfs.c [new file with mode: 0644]
shlibs/blkid/src/superblocks/superblocks.c
shlibs/blkid/src/superblocks/superblocks.h

index b4097217fc8bdc10ef5add48ebff3413be886819..a7c4a2315f2a9f2a6c5893ee62dbb4e2af158814 100644 (file)
@@ -42,4 +42,5 @@ libblkid_superblocks_la_SOURCES = \
                        btrfs.c \
                        lvm.c \
                        zfs.c \
-                       ubifs.c
+                       ubifs.c \
+                       bfs.c
diff --git a/shlibs/blkid/src/superblocks/bfs.c b/shlibs/blkid/src/superblocks/bfs.c
new file mode 100644 (file)
index 0000000..8a34c58
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2009 Red Hat, Inc.
+ *
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ */
+
+#include "superblocks.h"
+
+/*
+ * BFS actually has two different labels in the superblock, each
+ * of them only 6 bytes long.  Until we find out what their use
+ * we just ignore them.
+ */
+const struct blkid_idinfo bfs_idinfo =
+{
+       .name           = "bfs",
+       .usage          = BLKID_USAGE_FILESYSTEM,
+       .magics         = {
+               { .magic = "\xce\xfa\xad\x1b", .len = 4 },
+               { NULL }
+       }
+};
index 8cd50c9539e954737271845e353649a05522bcb5..d2c7825e8b4e66fcb7898ad6dd8d0ce2239faad3 100644 (file)
@@ -131,7 +131,8 @@ static const struct blkid_idinfo *idinfos[] =
        &squashfs_idinfo,
        &netware_idinfo,
        &btrfs_idinfo,
-       &ubifs_idinfo
+       &ubifs_idinfo,
+       &bfs_idinfo
 };
 
 /*
index 170c82606d97a94db5f4b65f7d785b56c75fe0ae..641397a7f459ac5d3993cf7e4f4528652822c133 100644 (file)
@@ -60,6 +60,7 @@ extern const struct blkid_idinfo xenix_idinfo;
 extern const struct blkid_idinfo btrfs_idinfo;
 extern const struct blkid_idinfo ubifs_idinfo;
 extern const struct blkid_idinfo zfs_idinfo;
+extern const struct blkid_idinfo bfs_idinfo;
 
 /*
  * superblock functions