diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-07 22:58:45 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-07 22:58:45 +0000 |
commit | 9bd7e6d90d2cc6e3ca20fd9819550af7b6e9cbe1 (patch) | |
tree | 361aa1d9bc9ebf4f2c4306dcb80ffda9c7440a8e /vl.c | |
parent | 37f9ba46003cf7629b1f2bc7604e8a945cd7e094 (diff) | |
download | hqemu-9bd7e6d90d2cc6e3ca20fd9819550af7b6e9cbe1.zip hqemu-9bd7e6d90d2cc6e3ca20fd9819550af7b6e9cbe1.tar.gz |
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
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -3940,10 +3940,15 @@ static int main_loop(void) 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 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_h: help(0); break; + case QEMU_OPTION_version: + version(); + exit(0); + break; case QEMU_OPTION_m: { uint64_t value; char *ptr; |