From 42e45bd4d98adc78cd01df683aefe0ff404defa6 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 17 Jun 2005 19:30:17 +0000 Subject: Add option -q, --quiet. It makes the output less verbose. --- dmiopt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'dmiopt.c') diff --git a/dmiopt.c b/dmiopt.c index 480b325..cf397ec 100644 --- a/dmiopt.c +++ b/dmiopt.c @@ -122,10 +122,11 @@ exit_free: int parse_command_line(int argc, char * const argv[]) { int option; - const char *optstring = "d:ht:uV"; + const char *optstring = "d:hqt:uV"; struct option longopts[]={ { "dev-mem", required_argument, NULL, 'd' }, { "help", no_argument, NULL, 'h' }, + { "quiet", no_argument, NULL, 'q' }, { "type", required_argument, NULL, 't' }, { "dump", no_argument, NULL, 'u' }, { "version", no_argument, NULL, 'V' }, @@ -141,6 +142,9 @@ int parse_command_line(int argc, char * const argv[]) case 'h': opt.flags|=FLAG_HELP; break; + case 'q': + opt.flags|=FLAG_QUIET; + break; case 't': opt.type=parse_opt_type(opt.type, optarg); if(opt.type==NULL) @@ -167,6 +171,7 @@ void print_help(void) "Options are:\n" " -d, --dev-mem FILE Read memory from device FILE (default: " DEFAULT_MEM_DEV ")\n" " -h, --help Display this help text and exit\n" + " -q, --quiet Less verbose output\n" " -t, --type TYPE Only display the entries of given type\n" " -u, --dump Do not decode the entries\n" " -V, --version Display the version and exit\n"; -- cgit v1.2.1