diff mbox

[1/2] kvm tools: Add OPT_GROUP to cmdline parser

Message ID 1302630851-19440-1-git-send-email-levinsasha928@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sasha Levin April 12, 2011, 5:54 p.m. UTC
Add the OPT_GROUP parser option to allow the creation of an organized help menu.
Used code taken from the git project.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 tools/kvm/include/kvm/parse-options.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/tools/kvm/include/kvm/parse-options.h b/tools/kvm/include/kvm/parse-options.h
index b59220d..5d8c618 100644
--- a/tools/kvm/include/kvm/parse-options.h
+++ b/tools/kvm/include/kvm/parse-options.h
@@ -132,6 +132,12 @@  intptr_t defval;
 	.help = (h)                         \
 }
 
+#define OPT_GROUP(h)                        \
+{                                           \
+	.type = OPTION_GROUP,               \
+	.help = (h)                         \
+}
+
 #define OPT_END() { .type = OPTION_END }
 
 enum {