From: Prasad Joshi <prasadjoshi124@gmail.com>
To: prasadjoshi124@gmail.com
Cc: mingo@elte.hu, kvm@vger.kernel.org, penberg@kernel.org,
asias.hejun@gmail.com, gorcunov@gmail.com,
oswaldo.cadenas@gmail.com
Subject: [PATCH v3 1/4] kvm tool: Generating list of common kvm tool commands
Date: Fri, 8 Apr 2011 16:11:12 +0100 [thread overview]
Message-ID: <1302275475-3882-1-git-send-email-prasadjoshi124@gmail.com> (raw)
- The Documentation/ directory will have a text file for each commmand. The
text file should contain the information about the command in manpage format.
- command-list.txt: is a list of common commands used with the kvm tool.
- util/generate-cmdlist.sh: is a shell script that uses command-list.txt and
text files in Documentation/ directory to generate the common-cmds.h file in
the include directory. The header file is furthur used to display a usage
messgae. Almost the entire script is copied from the tools/perf.
Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
---
tools/kvm/Documentation/kvm-run.txt | 53 +++++++++++++++++++++++++++++++++++
tools/kvm/command-list.txt | 5 +++
tools/kvm/util/generate-cmdlist.sh | 24 ++++++++++++++++
3 files changed, 82 insertions(+), 0 deletions(-)
create mode 100644 tools/kvm/Documentation/kvm-run.txt
create mode 100644 tools/kvm/command-list.txt
create mode 100755 tools/kvm/util/generate-cmdlist.sh
diff --git a/tools/kvm/Documentation/kvm-run.txt b/tools/kvm/Documentation/kvm-run.txt
new file mode 100644
index 0000000..c56434f
--- /dev/null
+++ b/tools/kvm/Documentation/kvm-run.txt
@@ -0,0 +1,53 @@
+kvm-run(1)
+================
+
+NAME
+----
+kvm-run - Start the virtual machine
+
+SYNOPSIS
+--------
+[verse]
+'kvm run' [-k <kernel image> | --kernel <kernel image>]
+
+DESCRIPTION
+-----------
+The command starts a virtual machine.
+
+OPTIONS
+-------
+-m::
+--mem=::
+ Virtual machine memory size in MiB.
+
+-p::
+--params::
+ Additional kernel command line arguments.
+
+-r::
+--initrd=::
+ Initial RAM disk image.
+
+-k::
+--kernel=::
+ The virtual machine kernel.
+-d
+--kvm-dev=::
+ KVM device file
+
+-i::
+--image=::
+ A disk image file.
+
+-s::
+--single-step:: Enable single stepping.
+
+-g::
+--ioport-debug:: Enable ioport debugging.
+
+-c::
+--enable-virtio-console:: Enable the virtual IO console
+
+SEE ALSO
+--------
+linkkvm:
diff --git a/tools/kvm/command-list.txt b/tools/kvm/command-list.txt
new file mode 100644
index 0000000..4eaf399
--- /dev/null
+++ b/tools/kvm/command-list.txt
@@ -0,0 +1,5 @@
+#
+# List of known perf commands.
+# command name category [deprecated] [common]
+#
+kvm-run mainporcelain common
diff --git a/tools/kvm/util/generate-cmdlist.sh b/tools/kvm/util/generate-cmdlist.sh
new file mode 100755
index 0000000..c3fd172
--- /dev/null
+++ b/tools/kvm/util/generate-cmdlist.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+echo "/* Automatically generated by $0 */
+struct cmdname_help
+{
+ char name[16];
+ char help[80];
+};
+
+static struct cmdname_help common_cmds[] = {"
+
+sed -n 's/^kvm-\([^ \t]*\).*common/\1/p' command-list.txt |
+sort |
+while read cmd
+do
+ # TODO following sed command should be fixed
+ sed -n '/^NAME/,/^kvm-'"$cmd"'/ {
+ /NAME/d
+ /--/d
+ s/.*kvm-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
+ p
+ }' "Documentation/kvm-$cmd.txt"
+done
+echo "};"
--
1.7.1
next reply other threads:[~2011-04-08 15:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-08 15:11 Prasad Joshi [this message]
2011-04-08 15:11 ` [PATCH v3 2/4] kvm tool: Mostly the copied code from perf for argument processing Prasad Joshi
2011-04-08 15:11 ` [PATCH v3 3/4] kvm tool: Provides the basic Gitish framework Prasad Joshi
2011-04-08 15:11 ` [PATCH v3 4/4] kvm tool: Using the Gitish freamwork to run the virtual machine Prasad Joshi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1302275475-3882-1-git-send-email-prasadjoshi124@gmail.com \
--to=prasadjoshi124@gmail.com \
--cc=asias.hejun@gmail.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oswaldo.cadenas@gmail.com \
--cc=penberg@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox