From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hollis Blanchard Date: Wed, 19 Mar 2008 17:39:34 +0000 Subject: Re: [kvm-ppc-devel] [PATCH] Fix undefined refrence Message-Id: <1205948374.11366.27.camel@basalt> List-Id: References: <782ef2276af9ca360e25.1205942780@thinkpad.austin.ibm.com> In-Reply-To: <782ef2276af9ca360e25.1205942780@thinkpad.austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Jerone Young Cc: kvm-devel@lists.sourceforge.net, kvm-ppc-devel@lists.sourceforge.net On Wed, 2008-03-19 at 11:06 -0500, Jerone Young wrote: > # HG changeset patch > # User Jerone Young > # Date 1205942671 18000 > # Branch merge > # Node ID 782ef2276af9ca360e25e07ec5ac0ec387428397 > # Parent 972f62b6acae693c388d7b05d3a9ba7ef26ab4a0 > Fix undefined refrence of qemu_system_device_hot_add for non x86 archs >=20 > This patch fixes it so that functions that depend on > qemu_system_device_hot_add() are only compiled for x86 archs. >=20 > Signed-off-by: Jerone Young >=20 > 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; > } >=20 > +#if defined(TARGET_I386) || defined(TARGET_X86_64) > void device_hot_add(int pcibus, const char *type, const char *opts) > { > PCIDevice *dev =3D NULL; > @@ -171,6 +172,7 @@ void device_hot_remove(int pcibus, int s >=20 > qemu_system_device_hot_add(pcibus, slot, 0); > } > +#endif >=20 > 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[] =3D { > { "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 cp= u state" }, > +#if defined(TARGET_I386) || defined(TARGET_X86_64) > { "drive_add", "iss", drive_hot_add, "pcibus pcidevfn [file=3Dfile][= ,if=3Dtype][,bus=3Dn]\n" > "[,unit=3Dm][,media=3Dd][index= =3Di]\n" > "[,cyls=3Dc,heads=3Dh,secs=3Ds[,= trans=3Dt]]\n" > @@ -1366,6 +1367,7 @@ static term_cmd_t term_cmds[] =3D { > "add drive to PCI storage contro= ller" }, > { "pci_add", "iss", device_hot_add, "bus nic|storage [[vlan=3Dn][,ma= caddr=ADdr][,model=3Dtype]] [file=3Dfile][,if=3Dtype][,bus=3Dnr]...", "hot-= add PCI device" }, > { "pci_del", "ii", device_hot_remove, "bus slot-number", "hot remove= PCI device" }, > +#endif > { NULL, NULL, }, > }; Why would we build any of this code? This whole file should be disabled at the Makefile level (with a configure patch to ifdef in monitor.c). --=20 Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------------------------- 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-ppc-devel mailing list kvm-ppc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel