[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [7035] Implement --version.
From: |
Paul Brook |
Subject: |
[Qemu-devel] [7035] Implement --version. |
Date: |
Tue, 07 Apr 2009 22:58:45 +0000 |
Revision: 7035
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7035
Author: pbrook
Date: 2009-04-07 22:58:45 +0000 (Tue, 07 Apr 2009)
Log Message:
-----------
Implement --version.
Signed-off-by: Paul Brook <address@hidden>
Modified Paths:
--------------
trunk/qemu-options.hx
trunk/vl.c
Modified: trunk/qemu-options.hx
===================================================================
--- trunk/qemu-options.hx 2009-04-07 22:48:36 UTC (rev 7034)
+++ trunk/qemu-options.hx 2009-04-07 22:58:45 UTC (rev 7035)
@@ -17,6 +17,13 @@
Display help and exit
ETEXI
+DEF("version", 0, QEMU_OPTION_version,
+ "-version display version information and exit\n")
+STEXI
address@hidden -version
+Display version information and exit
+ETEXI
+
DEF("M", HAS_ARG, QEMU_OPTION_M,
"-M machine select emulated machine (-M ? for list)\n")
STEXI
Modified: trunk/vl.c
===================================================================
--- trunk/vl.c 2009-04-07 22:48:36 UTC (rev 7034)
+++ trunk/vl.c 2009-04-07 22:58:45 UTC (rev 7035)
@@ -3940,10 +3940,15 @@
return ret;
}
+static void version(void)
+{
+ printf("QEMU PC emulator version " QEMU_VERSION ", Copyright (c) 2003-2008
Fabrice Bellard\n");
+}
+
static void help(int exitcode)
{
- printf("QEMU PC emulator version " QEMU_VERSION ", Copyright (c) 2003-2008
Fabrice Bellard\n"
- "usage: %s [options] [disk_image]\n"
+ version();
+ printf("usage: %s [options] [disk_image]\n"
"\n"
"'disk_image' is a raw hard image image for IDE hard disk 0\n"
"\n"
@@ -4598,6 +4603,10 @@
case QEMU_OPTION_h:
help(0);
break;
+ case QEMU_OPTION_version:
+ version();
+ exit(0);
+ break;
case QEMU_OPTION_m: {
uint64_t value;
char *ptr;
- [Qemu-devel] [7035] Implement --version.,
Paul Brook <=