X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fmemstat.c;h=dcfb3af96ea15ec725170e18da546c62eb76c653;hb=5ec04ab8c3a401ca0d73abe77a3e4d78f47eb1f6;hp=939f806b681a3a0ad847373a815f36772a872c07;hpb=6030db2543337976c1df861272ce90b25ef83820;p=awesomized%2Flibmemcached diff --git a/src/memstat.c b/src/memstat.c index 939f806b..dcfb3af9 100644 --- a/src/memstat.c +++ b/src/memstat.c @@ -50,21 +50,21 @@ void options_parse(int argc, char *argv[]) while (1) { - option_rv = getopt_long(argc, argv, "", long_options, &option_index); + option_rv = getopt_long(argc, argv, "Vhvds:", long_options, &option_index); if (option_rv == -1) break; switch (option_rv) { case 0: break; - case OPT_VERSION: /* --version */ + case OPT_VERSION: /* --version or -V */ printf("memcache tools, memcat, v1.0\n"); exit(0); break; - case OPT_HELP: /* --help */ + case OPT_HELP: /* --help or -h */ printf("useful help messages go here\n"); exit(0); break; - case OPT_SERVERS: /* --servers */ - opt_servers = strdup(optarg); + case OPT_SERVERS: /* --servers or -s */ + opt_servers = optarg; break; case '?': /* getopt_long already printed an error message. */