qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 1/1] Make vmport an optional feature at run time.


From: Ian Kirk
Subject: [Qemu-devel] [PATCH 1/1] Make vmport an optional feature at run time.
Date: Sun, 24 Aug 2008 12:47:25 +0100

Hi,

This is my first time sending a patch, so apologies for any errors.

Patch makes vmport optionally initiated.

---
 hw/pc.c |    3 ++-
 hw/pc.h |    1 +
 vl.c    |    7 +++++++
 3 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/hw/pc.c b/hw/pc.c
index 213ead8..56e1641 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -774,7 +774,8 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
         }
     }
 
-    vmport_init();
+    if (!no_vmport)
+        vmport_init();
 
     /* allocate RAM */
     ram_addr = qemu_ram_alloc(ram_size);
diff --git a/hw/pc.h b/hw/pc.h
index 2862849..b19d626 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -84,6 +84,7 @@ void rtc_set_date(RTCState *s, const struct tm *tm);
 
 /* pc.c */
 extern int fd_bootchk;
+extern int no_vmport;
 
 void ioport_set_a20(int enable);
 int ioport_get_a20(void);
diff --git a/vl.c b/vl.c
index 7ca8420..21012bf 100644
--- a/vl.c
+++ b/vl.c
@@ -217,6 +217,7 @@ const char *vnc_display;
 #endif
 int acpi_enabled = 1;
 int fd_bootchk = 1;
+int no_vmport = 0;
 int no_reboot = 0;
 int no_shutdown = 0;
 int cursor_hide = 1;
@@ -7664,6 +7665,7 @@ static void help(int exitcode)
            "-pflash file    use 'file' as a parallel flash image\n"
            "-boot [a|c|d|n] boot on floppy (a), hard disk (c), CD-ROM (d), or 
network (n)\n"
            "-snapshot       write to temporary files instead of disk image 
files\n"
+           "-no-vmport      disable vmport\n"
 #ifdef CONFIG_SDL
            "-no-frame       open SDL window without a frame and window 
decorations\n"
            "-alt-grab       use Ctrl-Alt-Shift to grab mouse (instead of 
Ctrl-Alt)\n"
@@ -7825,6 +7827,7 @@ enum {
     QEMU_OPTION_pflash,
     QEMU_OPTION_boot,
     QEMU_OPTION_snapshot,
+    QEMU_OPTION_no_vmport,
 #ifdef TARGET_I386
     QEMU_OPTION_no_fd_bootchk,
 #endif
@@ -7918,6 +7921,7 @@ const QEMUOption qemu_options[] = {
     { "pflash", HAS_ARG, QEMU_OPTION_pflash },
     { "boot", HAS_ARG, QEMU_OPTION_boot },
     { "snapshot", 0, QEMU_OPTION_snapshot },
+    { "no-vmport", 0, QEMU_OPTION_no_vmport },
 #ifdef TARGET_I386
     { "no-fd-bootchk", 0, QEMU_OPTION_no_fd_bootchk },
 #endif
@@ -8411,6 +8415,9 @@ int main(int argc, char **argv)
             case QEMU_OPTION_pflash:
                 drive_add(optarg, PFLASH_ALIAS);
                 break;
+            case QEMU_OPTION_no_vmport:
+                no_vmport = 1;
+                break;
             case QEMU_OPTION_snapshot:
                 snapshot = 1;
                 break;
-- 
1.5.4.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]