From b2ae936be5770cb95ef230182dc30da91308565b Mon Sep 17 00:00:00 2001 From: pjd Date: Wed, 9 Aug 2006 18:11:14 +0000 Subject: Allow geli to operate on read-only providers. Initial patch from: vd MFC after: 2 weeks --- sbin/geom/class/eli/geli.8 | 4 +++- sbin/geom/class/eli/geom_eli.c | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'sbin/geom/class') diff --git a/sbin/geom/class/eli/geli.8 b/sbin/geom/class/eli/geli.8 index e0ceeb0..fb5626a 100644 --- a/sbin/geom/class/eli/geli.8 +++ b/sbin/geom/class/eli/geli.8 @@ -64,7 +64,7 @@ utility: .Cm init .Nm .Cm attach -.Op Fl dpv +.Op Fl dprv .Op Fl k Ar keyfile .Ar prov .Nm @@ -288,6 +288,8 @@ Probably a better choice is the option for the .Cm detach subcommand. +.It Fl r +Attach read-only provider. It will not be opened for writting. .It Fl k Ar keyfile Specifies a file which contains part of the key. For more information see the description of the diff --git a/sbin/geom/class/eli/geom_eli.c b/sbin/geom/class/eli/geom_eli.c index e331ba9..d9543ae 100644 --- a/sbin/geom/class/eli/geom_eli.c +++ b/sbin/geom/class/eli/geom_eli.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2004 Pawel Jakub Dawidek + * Copyright (c) 2004-2006 Pawel Jakub Dawidek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -78,7 +78,7 @@ static void eli_dump(struct gctl_req *req); * * init [-bhPv] [-a aalgo] [-e ealgo] [-i iterations] [-l keylen] [-K newkeyfile] prov * label - alias for 'init' - * attach [-dpv] [-k keyfile] prov + * attach [-dprv] [-k keyfile] prov * detach [-fl] prov ... * stop - alias for 'detach' * onetime [-d] [-a aalgo] [-e ealgo] [-l keylen] prov ... @@ -124,9 +124,10 @@ struct g_command class_commands[] = { { 'd', "detach", NULL, G_TYPE_NONE }, { 'k', "keyfile", keyfile, G_TYPE_STRING }, { 'p', "nopassphrase", NULL, G_TYPE_NONE }, + { 'r', "readonly", NULL, G_TYPE_NONE }, G_OPT_SENTINEL }, - "[-dpv] [-k keyfile] prov" + "[-dprv] [-k keyfile] prov" }, { "detach", 0, NULL, { -- cgit v1.1