From 5f9fb168f3b710e4ff17139182112e2594fdb583 Mon Sep 17 00:00:00 2001 From: Jeroen Oortwijn Date: Thu, 14 Jan 2010 19:01:36 +0100 Subject: [PATCH] libblkid: Add initial support for BeFS detection Add initial support for detection of the Be File System to libblkid. Signed-off-by: Jeroen Oortwijn --- shlibs/blkid/src/superblocks/Makefile.am | 3 ++- shlibs/blkid/src/superblocks/befs.c | 18 ++++++++++++++++++ shlibs/blkid/src/superblocks/superblocks.c | 3 ++- shlibs/blkid/src/superblocks/superblocks.h | 1 + 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 shlibs/blkid/src/superblocks/befs.c diff --git a/shlibs/blkid/src/superblocks/Makefile.am b/shlibs/blkid/src/superblocks/Makefile.am index 33e5d0c3..f5b88b8e 100644 --- a/shlibs/blkid/src/superblocks/Makefile.am +++ b/shlibs/blkid/src/superblocks/Makefile.am @@ -45,4 +45,5 @@ libblkid_superblocks_la_SOURCES = \ ubifs.c \ bfs.c \ drbd.c \ - vmfs.c + vmfs.c \ + befs.c diff --git a/shlibs/blkid/src/superblocks/befs.c b/shlibs/blkid/src/superblocks/befs.c new file mode 100644 index 00000000..73d831df --- /dev/null +++ b/shlibs/blkid/src/superblocks/befs.c @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2010 Jeroen Oortwijn + * + * This file may be redistributed under the terms of the + * GNU Lesser General Public License. + */ + +#include "superblocks.h" + +const struct blkid_idinfo befs_idinfo = +{ + .name = "befs", + .usage = BLKID_USAGE_FILESYSTEM, + .magics = { + { .magic = "1SFB", .len = 4, .sboff = 0x220 }, + { NULL } + } +}; diff --git a/shlibs/blkid/src/superblocks/superblocks.c b/shlibs/blkid/src/superblocks/superblocks.c index 689f31bd..fd12e5ec 100644 --- a/shlibs/blkid/src/superblocks/superblocks.c +++ b/shlibs/blkid/src/superblocks/superblocks.c @@ -138,7 +138,8 @@ static const struct blkid_idinfo *idinfos[] = &btrfs_idinfo, &ubifs_idinfo, &bfs_idinfo, - &vmfs_fs_idinfo + &vmfs_fs_idinfo, + &befs_idinfo }; /* diff --git a/shlibs/blkid/src/superblocks/superblocks.h b/shlibs/blkid/src/superblocks/superblocks.h index 893ae72a..12f197e5 100644 --- a/shlibs/blkid/src/superblocks/superblocks.h +++ b/shlibs/blkid/src/superblocks/superblocks.h @@ -64,6 +64,7 @@ extern const struct blkid_idinfo bfs_idinfo; extern const struct blkid_idinfo vmfs_volume_idinfo; extern const struct blkid_idinfo vmfs_fs_idinfo; extern const struct blkid_idinfo drbd_idinfo; +extern const struct blkid_idinfo befs_idinfo; /* * superblock functions -- 2.39.5