summaryrefslogtreecommitdiff
path: root/sys/geom
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2017-04-21 07:16:07 +0000
committerAlexander Motin <mav@FreeBSD.org>2017-04-21 07:16:07 +0000
commitd8880fd450858bea24d5583bbb23874bee4dd790 (patch)
treebfaf4208af37063530e8036d2c1829be82cae3b2 /sys/geom
parent56e7a784ac2bd94a74d7d0dec7bd197cdd4f49a3 (diff)
downloadsrc-test2-d8880fd450858bea24d5583bbb23874bee4dd790.tar.gz
src-test2-d8880fd450858bea24d5583bbb23874bee4dd790.zip
Notes
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/eli/g_eli_ctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/geom/eli/g_eli_ctl.c b/sys/geom/eli/g_eli_ctl.c
index d5da71f44bdd..82471f7bbcef 100644
--- a/sys/geom/eli/g_eli_ctl.c
+++ b/sys/geom/eli/g_eli_ctl.c
@@ -618,7 +618,9 @@ g_eli_ctl_setkey(struct gctl_req *req, struct g_class *mp)
return;
}
/* Check if iterations number should and can be changed. */
- if (*valp != -1) {
+ if (*valp != -1 && md.md_iterations == -1) {
+ md.md_iterations = *valp;
+ } else if (*valp != -1 && *valp != md.md_iterations) {
if (bitcount32(md.md_keys) != 1) {
gctl_error(req, "To be able to use '-i' option, only "
"one key can be defined.");