diff options
author | Jean Delvare <jdelvare@suse.de> | 2005-06-17 19:30:17 +0000 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2005-06-17 19:30:17 +0000 |
commit | 42e45bd4d98adc78cd01df683aefe0ff404defa6 (patch) | |
tree | 6da2dd9e02beb32ea28cd5205ccd998a83d70c65 /dmiopt.c | |
parent | c55c10ac9661a557157ec46d3051d1572b2b0b5d (diff) | |
download | dmidecode-git-42e45bd4d98adc78cd01df683aefe0ff404defa6.tar.gz |
Add option -q, --quiet. It makes the output less verbose.
Diffstat (limited to 'dmiopt.c')
-rw-r--r-- | dmiopt.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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"; |