From e38ccfcd8e05aa08ff854359eefd7335df1317bd Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 6 Oct 2009 14:10:31 -0400 Subject: [PATCH] libblkid: add a probe for bfs 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 --- shlibs/blkid/src/superblocks/Makefile.am | 3 ++- shlibs/blkid/src/superblocks/bfs.c | 23 ++++++++++++++++++++++ shlibs/blkid/src/superblocks/superblocks.c | 3 ++- shlibs/blkid/src/superblocks/superblocks.h | 1 + 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 shlibs/blkid/src/superblocks/bfs.c diff --git a/shlibs/blkid/src/superblocks/Makefile.am b/shlibs/blkid/src/superblocks/Makefile.am index b4097217..a7c4a231 100644 --- a/shlibs/blkid/src/superblocks/Makefile.am +++ b/shlibs/blkid/src/superblocks/Makefile.am @@ -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 index 00000000..8a34c583 --- /dev/null +++ b/shlibs/blkid/src/superblocks/bfs.c @@ -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 } + } +}; diff --git a/shlibs/blkid/src/superblocks/superblocks.c b/shlibs/blkid/src/superblocks/superblocks.c index 8cd50c95..d2c7825e 100644 --- a/shlibs/blkid/src/superblocks/superblocks.c +++ b/shlibs/blkid/src/superblocks/superblocks.c @@ -131,7 +131,8 @@ static const struct blkid_idinfo *idinfos[] = &squashfs_idinfo, &netware_idinfo, &btrfs_idinfo, - &ubifs_idinfo + &ubifs_idinfo, + &bfs_idinfo }; /* diff --git a/shlibs/blkid/src/superblocks/superblocks.h b/shlibs/blkid/src/superblocks/superblocks.h index 170c8260..641397a7 100644 --- a/shlibs/blkid/src/superblocks/superblocks.h +++ b/shlibs/blkid/src/superblocks/superblocks.h @@ -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 -- 2.39.5