diff options
author | pjd <pjd@FreeBSD.org> | 2004-07-19 07:52:56 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2004-07-19 07:52:56 +0000 |
commit | 67d8cb396ecf47239ba3bff7d7a8f44ed7ceb7d5 (patch) | |
tree | 26c8d0e8e419f6a1e5ab7ad967cabc415115da7e /sbin/geom/class | |
parent | a21e64e66d53e47f27893fd35cd4109382156c64 (diff) | |
download | FreeBSD-src-67d8cb396ecf47239ba3bff7d7a8f44ed7ceb7d5.zip FreeBSD-src-67d8cb396ecf47239ba3bff7d7a8f44ed7ceb7d5.tar.gz |
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
Diffstat (limited to 'sbin/geom/class')
-rw-r--r-- | sbin/geom/class/nop/geom_nop.c | 6 | ||||
-rw-r--r-- | sbin/geom/class/nop/gnop.8 | 6 |
2 files changed, 11 insertions, 1 deletions
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] <dev1> [dev2 [...]]\n", name); + fprintf(stderr, "usage: %s create [-v] [-f failprob] [-o offset] [-s size] <dev1> [dev2 [...]]\n", name); fprintf(stderr, " %s configure [-v] [-f failprob] <prov1> [prov2 [...]]\n", name); fprintf(stderr, " %s destroy [-fv] <prov1> [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 |