summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali>2005-06-23 21:46:39 +0000
committerkhali <khali>2005-06-23 21:46:39 +0000
commit415dba30b990b3605df5c39b1f73e1ac73255ff0 (patch)
tree32534fee960e582904a366b7982d8c46792ce142
parenta1e4e1357148e91ce44671fcce7ce8e97db3a032 (diff)
downloaddmidecode-415dba30b990b3605df5c39b1f73e1ac73255ff0.tar.gz
Options --dump and --string are mutually exclusive.
-rw-r--r--dmiopt.c8
-rw-r--r--man/dmidecode.83
2 files changed, 9 insertions, 2 deletions
diff --git a/dmiopt.c b/dmiopt.c
index 3a29ac1..8761ec5 100644
--- a/dmiopt.c
+++ b/dmiopt.c
@@ -276,7 +276,13 @@ int parse_command_line(int argc, char * const argv[])
if(opt.type!=NULL && opt.string_offset)
{
- fprintf(stderr, "String and type modes are mutually exclusive\n");
+ fprintf(stderr, "Options --string and --type are mutually exclusive\n");
+ return -1;
+ }
+
+ if((opt.flags & FLAG_DUMP) && opt.string_offset)
+ {
+ fprintf(stderr, "Options --string and --dump are mutually exclusive\n");
return -1;
}
diff --git a/man/dmidecode.8 b/man/dmidecode.8
index a9c7d2f..df49a35 100644
--- a/man/dmidecode.8
+++ b/man/dmidecode.8
@@ -87,7 +87,7 @@ keywords is printed and
.B dmidecode
exits with an error.
This option cannot be used more than once, and implies \fB--quiet\fR.
-Mutually exclusive with \fB--type\fR.
+Mutually exclusive with \fB--type\fR and \fB--dump\fR.
.TP
.BR "-t" ", " "--type TYPE"
Only display the entries of type \fBTYPE\fR. \fBTYPE\fR can be either a
@@ -109,6 +109,7 @@ Do not decode the entries, dump their contents as hexadecimal instead.
Note that this is still a text output, no binary data will be thrown upon
you. The strings attached to each entry are displayed as both
hexadecimal and \s-1ASCII\s0. This option is mainly useful for debugging.
+Mutually exclusive with \fB--string\fR.
.TP
.BR "-h" ", " "--help"
Display usage information and exit