* 'master' of https://github.com/hjmallon/util-linux:
  libblkid: Add very basic APFS recognition
This commit is contained in:
Karel Zak 2018-07-04 13:25:07 +02:00
commit 3918998043
4 changed files with 23 additions and 1 deletions

View File

@ -44,6 +44,7 @@ libblkid_la_SOURCES = \
libblkid/src/partitions/unixware.c \
\
libblkid/src/superblocks/adaptec_raid.c \
libblkid/src/superblocks/apfs.c \
libblkid/src/superblocks/bcache.c \
libblkid/src/superblocks/befs.c \
libblkid/src/superblocks/bfs.c \

View File

@ -0,0 +1,19 @@
/*
* Copyright (C) 2018 Harry Mallon <hjmallon@gmail.com>
*
* This file may be redistributed under the terms of the
* GNU Lesser General Public License.
*/
#include "superblocks.h"
const struct blkid_idinfo apfs_idinfo =
{
.name = "apfs",
.usage = BLKID_USAGE_FILESYSTEM,
.magics =
{
{ .magic = "NXSB", .len = 4, .sboff = 32 },
{ NULL }
}
};

View File

@ -163,7 +163,8 @@ static const struct blkid_idinfo *idinfos[] =
&nilfs2_idinfo,
&exfat_idinfo,
&f2fs_idinfo,
&mpool_idinfo
&mpool_idinfo,
&apfs_idinfo
};
/*

View File

@ -82,6 +82,7 @@ extern const struct blkid_idinfo mpool_idinfo;
extern const struct blkid_idinfo vdo_idinfo;
extern const struct blkid_idinfo stratis_idinfo;
extern const struct blkid_idinfo bitlocker_idinfo;
extern const struct blkid_idinfo apfs_idinfo;
/*
* superblock functions