Blob Blame History Raw
#include "toksvc_driver_impl.h"
#include "argv/argv.h"

const struct argv_option toks_default_options[] = {
	{"version",		'v',TAG_VERSION,ARGV_OPTARG_NONE,0,0,0,
				"show version information"},

	{"help",		'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0,
				"show usage information [listing %s options only]"},

	{"sysroot",		0,TAG_SYSROOT,ARGV_OPTARG_REQUIRED,0,0,"<dir>",
				"pass a handle to %s to the spawned child process, "
				"and set it to be the child's intial root directory."},

	{"daemon",		0,TAG_DAEMON,ARGV_OPTARG_OPTIONAL,0,"default|always|never",0,
				"have the service's daemon thread handle signals sent by the "
				"application's own controlling terminal. The default is for "
				"the daemon thread to handle signals when the service runs as "
				"a stand-alone program, and defer the task to the main utility "
				"in all other cases."},

	{"uuid",		'u',TAG_UUID,ARGV_OPTARG_REQUIRED,0,0,"<uuid>",
				"set the service identifier to %s."},

	{"refstr",		'f',TAG_REFSTR,ARGV_OPTARG_REQUIRED,0,0,"<refstr>",
				"include the reference string %s in log records"
				"that pertain to this client."},

	{"tokens",		't',TAG_TOKENS,ARGV_OPTARG_REQUIRED,0,0,"<ntokens>",
				"set the number of available tokens to %s, which should be "
				"in the range of 1..9999."},

	{"connect",		'c',TAG_CONNECT,ARGV_OPTARG_NONE,0,0,0,
				"connect to the server without placing any request"},

	{"abort",		'k',TAG_ABORT,ARGV_OPTARG_NONE,0,0,0,
				"ask the token service to terminate"},

	{"acquire",		'a',TAG_ACQUIRE,ARGV_OPTARG_NONE,0,0,0,
				"acquire the next available token"},

	{"pid",			'p',TAG_PID,ARGV_OPTARG_REQUIRED,0,0,"<pid>",
				"assign the token to the framework process "
				"identified by %s"},

	{"release",		'r',TAG_RELEASE,ARGV_OPTARG_REQUIRED,0,0,"<token>",
				"release the key specified by %s."},

	{"timeout",		'm',TAG_TIMEOUT,ARGV_OPTARG_REQUIRED,0,0,"<millisecs>",
				"set the acquire operation's timeout to %s milliseconds; "
				"a timeout of zero milliseconds implies no wait at all; "
				"not setting a timeout implies an indefinite wait."},

	{0,0,0,0,0,0,0,0}
};