# HG changeset patch
# User Jerone Young <[EMAIL PROTECTED]>
# Date 1205942671 18000
# Branch merge
# Node ID 782ef2276af9ca360e25e07ec5ac0ec387428397
# Parent  972f62b6acae693c388d7b05d3a9ba7ef26ab4a0
Fix undefined refrence of qemu_system_device_hot_add for non x86 archs

This patch fixes it so that functions that depend on 
qemu_system_device_hot_add() are only compiled for x86 archs.

Signed-off-by: Jerone Young <[EMAIL PROTECTED]>

diff --git a/qemu/hw/device-hotplug.c b/qemu/hw/device-hotplug.c
--- a/qemu/hw/device-hotplug.c
+++ b/qemu/hw/device-hotplug.c
@@ -140,6 +140,7 @@ static PCIDevice *qemu_system_hot_add_st
     return opaque;
 }
 
+#if defined(TARGET_I386) || defined(TARGET_X86_64)
 void device_hot_add(int pcibus, const char *type, const char *opts)
 {
     PCIDevice *dev = NULL;
@@ -171,6 +172,7 @@ void device_hot_remove(int pcibus, int s
 
     qemu_system_device_hot_add(pcibus, slot, 0);
 }
+#endif
 
 static void destroy_nic(int slot)
 {
diff --git a/qemu/monitor.c b/qemu/monitor.c
--- a/qemu/monitor.c
+++ b/qemu/monitor.c
@@ -1359,6 +1359,7 @@ static term_cmd_t term_cmds[] = {
     { "migrate_set_speed", "s", do_migrate_set_speed,
       "value", "set maximum speed (in bytes) for migrations" },
     { "cpu_set", "is", do_cpu_set_nr, "cpu [online|offline]", "change cpu 
state" },
+#if defined(TARGET_I386) || defined(TARGET_X86_64)
     { "drive_add", "iss", drive_hot_add, "pcibus pcidevfn 
[file=file][,if=type][,bus=n]\n"
                                         "[,unit=m][,media=d][index=i]\n"
                                         "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
@@ -1366,6 +1367,7 @@ static term_cmd_t term_cmds[] = {
                                         "add drive to PCI storage controller" 
},
     { "pci_add", "iss", device_hot_add, "bus nic|storage 
[[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", 
"hot-add PCI device" },
     { "pci_del", "ii", device_hot_remove, "bus slot-number", "hot remove PCI 
device" },
+#endif
     { NULL, NULL, },
 };
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to