Implement --version.
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7035 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
37f9ba4600
commit
9bd7e6d90d
@ -17,6 +17,13 @@ STEXI
|
|||||||
Display help and exit
|
Display help and exit
|
||||||
ETEXI
|
ETEXI
|
||||||
|
|
||||||
|
DEF("version", 0, QEMU_OPTION_version,
|
||||||
|
"-version display version information and exit\n")
|
||||||
|
STEXI
|
||||||
|
@item -version
|
||||||
|
Display version information and exit
|
||||||
|
ETEXI
|
||||||
|
|
||||||
DEF("M", HAS_ARG, QEMU_OPTION_M,
|
DEF("M", HAS_ARG, QEMU_OPTION_M,
|
||||||
"-M machine select emulated machine (-M ? for list)\n")
|
"-M machine select emulated machine (-M ? for list)\n")
|
||||||
STEXI
|
STEXI
|
||||||
|
13
vl.c
13
vl.c
@ -3940,10 +3940,15 @@ static int main_loop(void)
|
|||||||
return ret;
|
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)
|
static void help(int exitcode)
|
||||||
{
|
{
|
||||||
printf("QEMU PC emulator version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"
|
version();
|
||||||
"usage: %s [options] [disk_image]\n"
|
printf("usage: %s [options] [disk_image]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"'disk_image' is a raw hard image image for IDE hard disk 0\n"
|
"'disk_image' is a raw hard image image for IDE hard disk 0\n"
|
||||||
"\n"
|
"\n"
|
||||||
@ -4598,6 +4603,10 @@ int main(int argc, char **argv, char **envp)
|
|||||||
case QEMU_OPTION_h:
|
case QEMU_OPTION_h:
|
||||||
help(0);
|
help(0);
|
||||||
break;
|
break;
|
||||||
|
case QEMU_OPTION_version:
|
||||||
|
version();
|
||||||
|
exit(0);
|
||||||
|
break;
|
||||||
case QEMU_OPTION_m: {
|
case QEMU_OPTION_m: {
|
||||||
uint64_t value;
|
uint64_t value;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user