From: Brian Aker Date: Sat, 29 Sep 2007 10:17:32 +0000 (-0700) Subject: Added parameter to memslap so that key generation can be controlled through X-Git-Tag: 0.3~11 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=ab31f9cbda82d44976955edbb821c7247ffd2b2b;p=awesomized%2Flibmemcached Added parameter to memslap so that key generation can be controlled through parameters. --- diff --git a/src/client_options.h b/src/client_options.h index 204135aa..cc427213 100644 --- a/src/client_options.h +++ b/src/client_options.h @@ -9,4 +9,5 @@ typedef enum { OPT_SET, OPT_REPLACE, OPT_ADD, + OPT_SLAP_DEFAULT_PAIRS, } memcached_options; diff --git a/src/memslap.c b/src/memslap.c index 0ea9cca3..ade9e11e 100644 --- a/src/memslap.c +++ b/src/memslap.c @@ -89,6 +89,7 @@ void options_parse(int argc, char *argv[]) {"debug", no_argument, &opt_verbose, OPT_DEBUG}, {"servers", required_argument, NULL, OPT_SERVERS}, {"flag", no_argument, &opt_displayflag, OPT_FLAG}, + {"default-pairs", required_argument, NULL, OPT_SLAP_DEFAULT_PAIRS}, {0, 0, 0, 0}, }; @@ -120,6 +121,9 @@ void options_parse(int argc, char *argv[]) case OPT_SERVERS: /* --servers or -s */ opt_servers= strdup(optarg); break; + case OPT_SLAP_DEFAULT_PAIRS: + opt_default_pairs= strtol(optarg, (char **)NULL, 10); + break; case '?': /* getopt_long already printed an error message. */ exit(1);