summaryrefslogtreecommitdiffstats
path: root/sys/geom/eli/g_eli.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-10-25 13:09:22 +0000
committerpjd <pjd@FreeBSD.org>2011-10-25 13:09:22 +0000
commit48cda601ebc2d64cef0d535e116f260f721d07a8 (patch)
treec91cd09d4ee90034f9f3c423db427a7812eeffe1 /sys/geom/eli/g_eli.c
parent3304c99aeb1b5253d01e719c059ce99bdb25466e (diff)
downloadFreeBSD-src-48cda601ebc2d64cef0d535e116f260f721d07a8.zip
FreeBSD-src-48cda601ebc2d64cef0d535e116f260f721d07a8.tar.gz
Prefer G_ELI_VERSION_* defines for version numbers over plain digits.
MFC after: 3 days
Diffstat (limited to 'sys/geom/eli/g_eli.c')
-rw-r--r--sys/geom/eli/g_eli.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c
index bbee007..fce52ae 100644
--- a/sys/geom/eli/g_eli.c
+++ b/sys/geom/eli/g_eli.c
@@ -717,12 +717,14 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *bpp,
sc->sc_crypto = G_ELI_CRYPTO_UNKNOWN;
sc->sc_flags = md->md_flags;
/* Backward compatibility. */
- if (md->md_version < 4)
+ if (md->md_version < G_ELI_VERSION_04)
sc->sc_flags |= G_ELI_FLAG_NATIVE_BYTE_ORDER;
- if (md->md_version < 5)
+ if (md->md_version < G_ELI_VERSION_05)
sc->sc_flags |= G_ELI_FLAG_SINGLE_KEY;
- if (md->md_version < 6 && (sc->sc_flags & G_ELI_FLAG_AUTH) != 0)
+ if (md->md_version < G_ELI_VERSION_06 &&
+ (sc->sc_flags & G_ELI_FLAG_AUTH) != 0) {
sc->sc_flags |= G_ELI_FLAG_FIRST_KEY;
+ }
sc->sc_ealgo = md->md_ealgo;
sc->sc_nkey = nkey;
OpenPOWER on IntegriCloud