From 67d8cb396ecf47239ba3bff7d7a8f44ed7ceb7d5 Mon Sep 17 00:00:00 2001 From: pjd Date: Mon, 19 Jul 2004 07:52:56 +0000 Subject: MFp4: Add two options for gnop(8)'s 'create' command: -o offset - specifies where to start on the original provider -s size - specifies size of the transparent provider --- sbin/geom/class/nop/geom_nop.c | 6 +++++- sbin/geom/class/nop/gnop.8 | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'sbin/geom/class') diff --git a/sbin/geom/class/nop/geom_nop.c b/sbin/geom/class/nop/geom_nop.c index e1840c9..cd4f6af 100644 --- a/sbin/geom/class/nop/geom_nop.c +++ b/sbin/geom/class/nop/geom_nop.c @@ -39,11 +39,15 @@ uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_NOP_VERSION; static intmax_t failprob = 0; +static intmax_t offset = 0; +static intmax_t size = 0; struct g_command class_commands[] = { { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, { { 'f', "failprob", &failprob, G_TYPE_NUMBER }, + { 'o', "offset", &offset, G_TYPE_NUMBER }, + { 's', "size", &size, G_TYPE_NUMBER }, G_OPT_SENTINEL } }, @@ -67,7 +71,7 @@ void usage(const char *name) { - fprintf(stderr, "usage: %s create [-v] [-f failprob] [dev2 [...]]\n", name); + fprintf(stderr, "usage: %s create [-v] [-f failprob] [-o offset] [-s size] [dev2 [...]]\n", name); fprintf(stderr, " %s configure [-v] [-f failprob] [prov2 [...]]\n", name); fprintf(stderr, " %s destroy [-fv] [prov2 [...]]\n", name); } diff --git a/sbin/geom/class/nop/gnop.8 b/sbin/geom/class/nop/gnop.8 index 8ef9bab..d113207 100644 --- a/sbin/geom/class/nop/gnop.8 +++ b/sbin/geom/class/nop/gnop.8 @@ -35,6 +35,8 @@ .Cm create .Op Fl v .Op Fl f Ar failprob +.Op Fl o Ar offset +.Op Fl s Ar size .Ar dev1 .Op Ar dev2 Op Ar ... .Nm @@ -103,6 +105,10 @@ Additional options: Force the removal of the specified provider. .It Fl f Ar failprob Specifies failure probability in percentage. +.It Fl o Ar offset +Where to begin on the original provider. +.It Fl o Ar size +Size of the transparent provider. .It Fl v Be more verbose. .El -- cgit v1.1