Skip to content

Commit 32d3fbb

Browse files
committed
Options --dump and --quiet are mutually exclusive.
1 parent 8b5df92 commit 32d3fbb

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

dmiopt.c

+6
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,12 @@ int parse_command_line(int argc, char * const argv[])
286286
return -1;
287287
}
288288

289+
if((opt.flags & FLAG_DUMP) && (opt.flags & FLAG_QUIET))
290+
{
291+
fprintf(stderr, "Options --quiet and --dump are mutually exclusive\n");
292+
return -1;
293+
}
294+
289295
return 0;
290296
}
291297

man/dmidecode.8

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ Read memory from device \fBFILE\fR (default: \fB/dev/mem\fR)
6363
.TP
6464
.BR "-q" ", " "--quiet"
6565
Be less verbose. Unknown, inactive and \s-1OEM\s0-specific entries are not
66-
displayed. Meta-data and handle references are hidden.
66+
displayed. Meta-data and handle references are hidden. Mutually exclusive
67+
with \fB--dump\fR.
6768
.TP
6869
.BR "-s" ", " "--string KEYWORD"
6970
Only display the value of the \s-1DMI\s0 string identified by \fBKEYWORD\fR.
@@ -109,7 +110,7 @@ Do not decode the entries, dump their contents as hexadecimal instead.
109110
Note that this is still a text output, no binary data will be thrown upon
110111
you. The strings attached to each entry are displayed as both
111112
hexadecimal and \s-1ASCII\s0. This option is mainly useful for debugging.
112-
Mutually exclusive with \fB--string\fR.
113+
Mutually exclusive with \fB--quiet\fR and \fB--string\fR.
113114
.TP
114115
.BR "-h" ", " "--help"
115116
Display usage information and exit

0 commit comments

Comments
 (0)