aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMariusz Zaborski <oshogbo@FreeBSD.org>2018-05-09 20:51:16 +0000
committerMariusz Zaborski <oshogbo@FreeBSD.org>2018-05-09 20:51:16 +0000
commitc2ac0fc5e065c17a06578c7b1a847678aa1f3f04 (patch)
tree86e0cd48f070870ba8ea9408855c05204df71ede /sbin
parente310437971b858108259431d4a452deab9cdadaf (diff)
downloadsrc-c2ac0fc5e065c17a06578c7b1a847678aa1f3f04.tar.gz
src-c2ac0fc5e065c17a06578c7b1a847678aa1f3f04.zip
Change option dry-run from 'n' to 'C' in geli attach command.
'n' is used in other commands to define the key index. We should be consistent with that. 'C' option is used by patch(1) to perform dryrun so lets use that. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D15308
Notes
Notes: svn path=/head/; revision=333438
Diffstat (limited to 'sbin')
-rw-r--r--sbin/geom/class/eli/geli.810
-rw-r--r--sbin/geom/class/eli/geom_eli.c6
2 files changed, 8 insertions, 8 deletions
diff --git a/sbin/geom/class/eli/geli.8 b/sbin/geom/class/eli/geli.8
index e88cf78dd413..25565ee58fa5 100644
--- a/sbin/geom/class/eli/geli.8
+++ b/sbin/geom/class/eli/geli.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 10, 2018
+.Dd May 9, 2018
.Dt GELI 8
.Os
.Sh NAME
@@ -67,7 +67,7 @@ utility:
.Cm init
.Nm
.Cm attach
-.Op Fl dnprv
+.Op Fl Cdprv
.Op Fl j Ar passfile
.Op Fl k Ar keyfile
.Ar prov
@@ -393,6 +393,9 @@ suffix.
.Pp
Additional options include:
.Bl -tag -width ".Fl j Ar passfile"
+.It Fl C
+Do a dry-run decryption.
+This is useful to verify passphrase and keyfile without decrypting the device.
.It Fl d
If specified, a decrypted provider will be detached automatically on last close.
This can help with scarce memory so the user does not have to remember to detach the
@@ -420,9 +423,6 @@ For more information see the description of the
option for the
.Cm init
subcommand.
-.It Fl n
-Do a dry-run decryption.
-This is useful to verify passphrase and keyfile without decrypting the device.
.It Fl p
Do not use a passphrase as a component of the User Key.
Cannot be combined with the
diff --git a/sbin/geom/class/eli/geom_eli.c b/sbin/geom/class/eli/geom_eli.c
index bb43a4910260..69693f2d6821 100644
--- a/sbin/geom/class/eli/geom_eli.c
+++ b/sbin/geom/class/eli/geom_eli.c
@@ -86,7 +86,7 @@ static int eli_backup_create(struct gctl_req *req, const char *prov,
*
* init [-bdgPTv] [-a aalgo] [-B backupfile] [-e ealgo] [-i iterations] [-l keylen] [-J newpassfile] [-K newkeyfile] [-s sectorsize] [-V version] prov
* label - alias for 'init'
- * attach [-dprv] [-j passfile] [-k keyfile] prov
+ * attach [-Cdprv] [-j passfile] [-k keyfile] prov
* detach [-fl] prov ...
* stop - alias for 'detach'
* onetime [-d] [-a aalgo] [-e ealgo] [-l keylen] prov
@@ -145,15 +145,15 @@ struct g_command class_commands[] = {
},
{ "attach", G_FLAG_VERBOSE | G_FLAG_LOADKLD, eli_main,
{
+ { 'C', "dryrun", NULL, G_TYPE_BOOL },
{ 'd', "detach", NULL, G_TYPE_BOOL },
{ 'j', "passfile", G_VAL_OPTIONAL, G_TYPE_STRING | G_TYPE_MULTI },
{ 'k', "keyfile", G_VAL_OPTIONAL, G_TYPE_STRING | G_TYPE_MULTI },
- { 'n', "dryrun", NULL, G_TYPE_BOOL },
{ 'p', "nopassphrase", NULL, G_TYPE_BOOL },
{ 'r', "readonly", NULL, G_TYPE_BOOL },
G_OPT_SENTINEL
},
- "[-dnprv] [-j passfile] [-k keyfile] prov"
+ "[-Cdprv] [-j passfile] [-k keyfile] prov"
},
{ "detach", 0, NULL,
{