All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] Generating list of common kvm tool commands
@ 2011-04-07 19:47 Prasad Joshi
  2011-04-07 19:47 ` [PATCH 2/4] Mostly the copied code from perf for argument processing Prasad Joshi
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Prasad Joshi @ 2011-04-07 19:47 UTC (permalink / raw)
  To: prasadjoshi124
  Cc: mingo, kvm, penberg, asias.hejun, gorcunov, oswaldo.cadenas

- 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.

Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
---
 tools/kvm/Documentation/kvm-run.txt |   48 +++++++++++++++++++++++++++++++++++
 tools/kvm/command-list.txt          |    5 +++
 tools/kvm/util/generate-cmdlist.sh  |   24 +++++++++++++++++
 3 files changed, 77 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..f563898
--- /dev/null
+++ b/tools/kvm/Documentation/kvm-run.txt
@@ -0,0 +1,48 @@
+kvm-run(1)
+================
+
+NAME
+----
+kvm-run - Start the virtual machine
+
+SYNOPSIS
+--------
+[verse]
+'kvm run' [-k <kernel image> | --kernel <kernel image>]
+          [-d <image file> | --image <image file>]
+
+DESCRIPTION
+-----------
+The command starts a virtual machine.
+
+OPTIONS
+-------
+-m::
+--mem=::
+        Virtual machine memory size in MiB.
+
+-p::
+--params::
+        Additional kernel command line arguments.
+
+-i::
+--initrd=::
+        Initial RAM disk image.
+
+-k::
+--kernel=::
+        The virtual machine kernel.
+
+-d::
+--image=::
+        A disk image file.
+
+-s::
+--single-step:: Enable single stepping.
+
+-g::
+--ioport-debug:: Enable ioport debugging.
+
+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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-04-08  6:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-07 19:47 [PATCH 1/4] Generating list of common kvm tool commands Prasad Joshi
2011-04-07 19:47 ` [PATCH 2/4] Mostly the copied code from perf for argument processing Prasad Joshi
2011-04-07 20:17   ` David Ahern
2011-04-08  5:43     ` Pekka Enberg
2011-04-08  6:04       ` Ingo Molnar
2011-04-07 19:47 ` [PATCH 3/4] Provides the basic Gitish framework Prasad Joshi
2011-04-07 20:14   ` Ingo Molnar
2011-04-07 22:33     ` Prasad Joshi
2011-04-08  5:44       ` Pekka Enberg
2011-04-08  6:10         ` Ingo Molnar
2011-04-07 19:47 ` [PATCH 4/4] Using the Gitish freamwork to run the virtual machine Prasad Joshi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.