diff options
author | pjd <pjd@FreeBSD.org> | 2011-04-02 06:59:05 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2011-04-02 06:59:05 +0000 |
commit | 025061f4e03d8a697012942953f4310a82d7a8ba (patch) | |
tree | ecdad3559068f968a3f46d028493ef1da4a8130d /sbin/ggate/ggatel/ggatel.c | |
parent | 6fa8fbd0297a9b58330730ad979974ff50d3fa70 (diff) | |
download | FreeBSD-src-025061f4e03d8a697012942953f4310a82d7a8ba.zip FreeBSD-src-025061f4e03d8a697012942953f4310a82d7a8ba.tar.gz |
Because ggatel(8) operates on local GEOM providers, use unlimited queue size in
GEOM GATE to fix the issue described in r220264. This also means that we no
longer need -q option, remove it. Don't bother to leaving it as a no-op, as
ggatel(8) is just an example utility.
Diffstat (limited to 'sbin/ggate/ggatel/ggatel.c')
-rw-r--r-- | sbin/ggate/ggatel/ggatel.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sbin/ggate/ggatel/ggatel.c b/sbin/ggate/ggatel/ggatel.c index 6a3f26e..d9e49db 100644 --- a/sbin/ggate/ggatel/ggatel.c +++ b/sbin/ggate/ggatel/ggatel.c @@ -53,7 +53,6 @@ static const char *path = NULL; static int unit = G_GATE_UNIT_AUTO; static unsigned flags = 0; static int force = 0; -static unsigned queue_size = G_GATE_QUEUE_SIZE; static unsigned sectorsize = 0; static unsigned timeout = G_GATE_TIMEOUT; @@ -61,7 +60,7 @@ static void usage(void) { - fprintf(stderr, "usage: %s create [-v] [-o <ro|wo|rw>] [-q queue_size] " + fprintf(stderr, "usage: %s create [-v] [-o <ro|wo|rw>] " "[-s sectorsize] [-t timeout] [-u unit] <path>\n", getprogname()); fprintf(stderr, " %s rescue [-v] [-o <ro|wo|rw>] <-u unit> " "<path>\n", getprogname()); @@ -182,7 +181,7 @@ g_gatel_create(void) ggioc.gctl_sectorsize = sectorsize; ggioc.gctl_timeout = timeout; ggioc.gctl_flags = flags; - ggioc.gctl_maxcount = queue_size; + ggioc.gctl_maxcount = 0; strlcpy(ggioc.gctl_info, path, sizeof(ggioc.gctl_info)); g_gate_ioctl(G_GATE_CMD_CREATE, &ggioc); if (unit == -1) @@ -230,7 +229,7 @@ main(int argc, char *argv[]) for (;;) { int ch; - ch = getopt(argc, argv, "fo:q:s:t:u:v"); + ch = getopt(argc, argv, "fo:s:t:u:v"); if (ch == -1) break; switch (ch) { @@ -253,14 +252,6 @@ main(int argc, char *argv[]) "Invalid argument for '-o' option."); } break; - case 'q': - if (action != CREATE) - usage(); - errno = 0; - queue_size = strtoul(optarg, NULL, 10); - if (queue_size == 0 && errno != 0) - errx(EXIT_FAILURE, "Invalid queue_size."); - break; case 's': if (action != CREATE) usage(); |