diff mbox

[13/13] stubs: do not call monitor_printf()

Message ID 1382058681-14957-14-git-send-email-xiawenc@linux.vnet.ibm.com
State New
Headers show

Commit Message

Wayne Xia Oct. 18, 2013, 1:11 a.m. UTC
stubs/pci-drive-host-add.o is packaged together with /stubs/mon-printf.o
so it would not work normal, remove it.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 stubs/pci-drive-hot-add.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Paolo Bonzini Oct. 18, 2013, 9:52 a.m. UTC | #1
Il 18/10/2013 03:11, Wenchao Xia ha scritto:
> stubs/pci-drive-host-add.o is packaged together with /stubs/mon-printf.o
> so it would not work normal, remove it.
> 
> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> ---
>  stubs/pci-drive-hot-add.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/stubs/pci-drive-hot-add.c b/stubs/pci-drive-hot-add.c
> index 1d98145..af4612f 100644
> --- a/stubs/pci-drive-hot-add.c
> +++ b/stubs/pci-drive-hot-add.c
> @@ -5,6 +5,5 @@
>  int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo)
>  {
>      /* On non-x86 we don't do PCI hotplug */
> -    monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type);
>      return -1;
>  }
> 

This is wrong; stubs are independent, that's why each of them is in its
own C file.

When linking a version of QEMU that does not have pci_drive_hot_add,
this function will call the monitor_printf from QEMU.

Paolo
Wayne Xia Oct. 21, 2013, 6:04 a.m. UTC | #2
于 2013/10/18 17:52, Paolo Bonzini 写道:
> Il 18/10/2013 03:11, Wenchao Xia ha scritto:
>> stubs/pci-drive-host-add.o is packaged together with /stubs/mon-printf.o
>> so it would not work normal, remove it.
>>
>> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
>> ---
>>   stubs/pci-drive-hot-add.c |    1 -
>>   1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/stubs/pci-drive-hot-add.c b/stubs/pci-drive-hot-add.c
>> index 1d98145..af4612f 100644
>> --- a/stubs/pci-drive-hot-add.c
>> +++ b/stubs/pci-drive-hot-add.c
>> @@ -5,6 +5,5 @@
>>   int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo)
>>   {
>>       /* On non-x86 we don't do PCI hotplug */
>> -    monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type);
>>       return -1;
>>   }
>>
> This is wrong; stubs are independent, that's why each of them is in its
> own C file.
>
> When linking a version of QEMU that does not have pci_drive_hot_add,
> this function will call the monitor_printf from QEMU.
>
> Paolo
>
I see, will drop it.
diff mbox

Patch

diff --git a/stubs/pci-drive-hot-add.c b/stubs/pci-drive-hot-add.c
index 1d98145..af4612f 100644
--- a/stubs/pci-drive-hot-add.c
+++ b/stubs/pci-drive-hot-add.c
@@ -5,6 +5,5 @@ 
 int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo)
 {
     /* On non-x86 we don't do PCI hotplug */
-    monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type);
     return -1;
 }