diff options
author | pjd <pjd@FreeBSD.org> | 2011-05-08 09:25:16 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2011-05-08 09:25:16 +0000 |
commit | b2b06929c84acd5b59f54c25025bfb81e6f04796 (patch) | |
tree | 35f856d4dcf69e78bd89416e1c685b4cb12c5194 /sys/geom/eli | |
parent | f18109261254e7d3e5f5dfcf14360c385941a4cc (diff) | |
download | FreeBSD-src-b2b06929c84acd5b59f54c25025bfb81e6f04796.zip FreeBSD-src-b2b06929c84acd5b59f54c25025bfb81e6f04796.tar.gz |
Detect and handle metadata of version 6.
MFC after: 1 week
Diffstat (limited to 'sys/geom/eli')
-rw-r--r-- | sys/geom/eli/g_eli.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/geom/eli/g_eli.h b/sys/geom/eli/g_eli.h index 9c96e61..68f92e5 100644 --- a/sys/geom/eli/g_eli.h +++ b/sys/geom/eli/g_eli.h @@ -265,7 +265,7 @@ eli_metadata_decode_v0(const u_char *data, struct g_eli_metadata *md) } static __inline int -eli_metadata_decode_v1v2v3v4v5(const u_char *data, struct g_eli_metadata *md) +eli_metadata_decode_v1v2v3v4v5v6(const u_char *data, struct g_eli_metadata *md) { MD5_CTX ctx; const u_char *p; @@ -296,15 +296,16 @@ eli_metadata_decode(const u_char *data, struct g_eli_metadata *md) bcopy(data, md->md_magic, sizeof(md->md_magic)); md->md_version = le32dec(data + sizeof(md->md_magic)); switch (md->md_version) { - case 0: + case G_ELI_VERSION_00: error = eli_metadata_decode_v0(data, md); break; - case 1: - case 2: - case 3: - case 4: - case 5: - error = eli_metadata_decode_v1v2v3v4v5(data, md); + case G_ELI_VERSION_01: + case G_ELI_VERSION_02: + case G_ELI_VERSION_03: + case G_ELI_VERSION_04: + case G_ELI_VERSION_05: + case G_ELI_VERSION_06: + error = eli_metadata_decode_v1v2v3v4v5v6(data, md); break; default: error = EINVAL; |