diff mbox

virtio-9p: Fix virtio-9p no longer building after hw-dirs branch merge

Message ID 1365495755-10902-1-git-send-email-hdegoede@redhat.com
State New
Headers show

Commit Message

Hans de Goede April 9, 2013, 8:22 a.m. UTC
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/9pfs/virtio-9p-device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini April 9, 2013, 8:36 a.m. UTC | #1
Il 09/04/2013 10:22, Hans de Goede ha scritto:
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/9pfs/virtio-9p-device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Ouch, /me installs libcap-ng-devel.

Thanks.

Paolo

> diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
> index 43f930e..b476b81 100644
> --- a/hw/9pfs/virtio-9p-device.c
> +++ b/hw/9pfs/virtio-9p-device.c
> @@ -12,11 +12,11 @@
>   */
>  
>  #include "hw/virtio/virtio.h"
> +#include "hw/virtio/virtio-9p.h"
>  #include "hw/i386/pc.h"
>  #include "qemu/sockets.h"
>  #include "virtio-9p.h"
>  #include "fsdev/qemu-fsdev.h"
> -#include "virtio-9p-device.h"
>  #include "virtio-9p-xattr.h"
>  #include "virtio-9p-coth.h"
>  
>
fred.konrad@greensocs.com April 9, 2013, 9:30 a.m. UTC | #2
On 09/04/2013 10:36, Paolo Bonzini wrote:
> Il 09/04/2013 10:22, Hans de Goede ha scritto:
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>   hw/9pfs/virtio-9p-device.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> Ouch, /me installs libcap-ng-devel.
>
> Thanks.
>
> Paolo
>
>> diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
>> index 43f930e..b476b81 100644
>> --- a/hw/9pfs/virtio-9p-device.c
>> +++ b/hw/9pfs/virtio-9p-device.c
>> @@ -12,11 +12,11 @@
>>    */
>>   
>>   #include "hw/virtio/virtio.h"
>> +#include "hw/virtio/virtio-9p.h"
[..]
>>   #include "virtio-9p.h"
Is that normal?

We have two virtio-9p.h:
./hw/9pfs/virtio-9p.h
./include/hw/virtio/virtio-9p.h

which can be confusing.

is it not better to re-rename virtio-9p.h => virtio-9p-device.h?
>> -#include "virtio-9p-device.h"
>>   
>>
>
Paolo Bonzini April 9, 2013, 9:36 a.m. UTC | #3
Il 09/04/2013 11:30, KONRAD Frédéric ha scritto:
>>>
>>>     #include "hw/virtio/virtio.h"
>>> +#include "hw/virtio/virtio-9p.h"
> [..]
>>>   #include "virtio-9p.h"
> Is that normal?
> 
> We have two virtio-9p.h:
> ./hw/9pfs/virtio-9p.h
> ./include/hw/virtio/virtio-9p.h
> 
> which can be confusing.

Yes, the first one is only included with a local path.  Though I think
this is what confused my scripts.

Paolo
fred.konrad@greensocs.com April 9, 2013, 11:15 a.m. UTC | #4
On 09/04/2013 11:36, Paolo Bonzini wrote:
> Il 09/04/2013 11:30, KONRAD Frédéric ha scritto:
>>>>      #include "hw/virtio/virtio.h"
>>>> +#include "hw/virtio/virtio-9p.h"
>> [..]
>>>>    #include "virtio-9p.h"
>> Is that normal?
>>
>> We have two virtio-9p.h:
>> ./hw/9pfs/virtio-9p.h
>> ./include/hw/virtio/virtio-9p.h
>>
>> which can be confusing.
> Yes, the first one is only included with a local path.  Though I think
> this is what confused my scripts.
>
> Paolo
Ok, so you'll keep the same name for both files?

Thanks,
Fred
Markus Armbruster April 9, 2013, 11:30 a.m. UTC | #5
Paolo Bonzini <pbonzini@redhat.com> writes:

> Il 09/04/2013 11:30, KONRAD Frédéric ha scritto:
>>>>
>>>>     #include "hw/virtio/virtio.h"
>>>> +#include "hw/virtio/virtio-9p.h"
>> [..]
>>>>   #include "virtio-9p.h"
>> Is that normal?
>> 
>> We have two virtio-9p.h:
>> ./hw/9pfs/virtio-9p.h
>> ./include/hw/virtio/virtio-9p.h
>> 
>> which can be confusing.
>
> Yes, the first one is only included with a local path.  Though I think
> this is what confused my scripts.

It'll confuse maintenance programmers, too.  Rename one of them?  For
what it's worth, the second was named virtio-9p-device.h until you
renamed & moved it.
Paolo Bonzini April 9, 2013, 11:48 a.m. UTC | #6
Il 09/04/2013 13:30, Markus Armbruster ha scritto:
>>> >> We have two virtio-9p.h:
>>> >> ./hw/9pfs/virtio-9p.h
>>> >> ./include/hw/virtio/virtio-9p.h
>>> >> 
>>> >> which can be confusing.
>> >
>> > Yes, the first one is only included with a local path.  Though I think
>> > this is what confused my scripts.
> It'll confuse maintenance programmers, too.  Rename one of them?  For
> what it's worth, the second was named virtio-9p-device.h until you
> renamed & moved it.

The second isn't named virtio-9p.h.  It is named hw/virtio/virtio-9p.h.
 There is no -Iinclude/hw/virtio path, so you need the full path to
include it.

If you look at Linux, you have similarly include/scsi/scsi.h (for
#include <scsi/scsi.h>) and drivers/scsi/scsi.h (for #include "scsi.h").

Paolo
Anthony Liguori April 9, 2013, 7:13 p.m. UTC | #7
Paolo Bonzini <pbonzini@redhat.com> writes:

> Il 09/04/2013 10:22, Hans de Goede ha scritto:
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>  hw/9pfs/virtio-9p-device.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion
>
> Ouch, /me installs libcap-ng-devel.

On a fresh F18, I tried to find all the deps needed that can be
reasonably installed.  This is what I came up with:

# yum install xen-devel iasl libfdt-devel libcap-ng-devel \
  spice-server-devel gnutls-devel cyrus-sasl-devel libjpeg-turbo-devel \
  libpng-devel uuid-devel xfsprogs-devel ncurses-devel brlapi-devel \
  libcurl-devel bluez-libs-devel libiscsi-devel libcap-ng-devel \
  spice-protocol SDL-devel libcap-devel usbredir-devel libseccomp-devel \
  ceph-devel

Still missing GlusterFS, VDE, and iscsi.  F18 doesn't seem to
package these at appropriate versions.

Regards,

Anthony Liguori

>
> Thanks.
>
> Paolo
>
>> diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
>> index 43f930e..b476b81 100644
>> --- a/hw/9pfs/virtio-9p-device.c
>> +++ b/hw/9pfs/virtio-9p-device.c
>> @@ -12,11 +12,11 @@
>>   */
>>  
>>  #include "hw/virtio/virtio.h"
>> +#include "hw/virtio/virtio-9p.h"
>>  #include "hw/i386/pc.h"
>>  #include "qemu/sockets.h"
>>  #include "virtio-9p.h"
>>  #include "fsdev/qemu-fsdev.h"
>> -#include "virtio-9p-device.h"
>>  #include "virtio-9p-xattr.h"
>>  #include "virtio-9p-coth.h"
>>  
>>
fred.konrad@greensocs.com April 9, 2013, 8:27 p.m. UTC | #8
On 09/04/2013 21:13, Anthony Liguori wrote:
> Paolo Bonzini <pbonzini@redhat.com> writes:
>
>> Il 09/04/2013 10:22, Hans de Goede ha scritto:
>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>>> ---
>>>   hw/9pfs/virtio-9p-device.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion
>> Ouch, /me installs libcap-ng-devel.
> On a fresh F18, I tried to find all the deps needed that can be
> reasonably installed.  This is what I came up with:
>
> # yum install xen-devel iasl libfdt-devel libcap-ng-devel \
>    spice-server-devel gnutls-devel cyrus-sasl-devel libjpeg-turbo-devel \
>    libpng-devel uuid-devel xfsprogs-devel ncurses-devel brlapi-devel \
>    libcurl-devel bluez-libs-devel libiscsi-devel libcap-ng-devel \
>    spice-protocol SDL-devel libcap-devel usbredir-devel libseccomp-devel \
>    ceph-devel
>
> Still missing GlusterFS, VDE, and iscsi.  F18 doesn't seem to
> package these at appropriate versions.
>
> Regards,
>
> Anthony Liguori
Isn't libattr-devel needed as well for virtio-9p?

I needed it to test my patch-set this morning.
>
>> Thanks.
>>
>> Paolo
>>
>>> diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
>>> index 43f930e..b476b81 100644
>>> --- a/hw/9pfs/virtio-9p-device.c
>>> +++ b/hw/9pfs/virtio-9p-device.c
>>> @@ -12,11 +12,11 @@
>>>    */
>>>   
>>>   #include "hw/virtio/virtio.h"
>>> +#include "hw/virtio/virtio-9p.h"
>>>   #include "hw/i386/pc.h"
>>>   #include "qemu/sockets.h"
>>>   #include "virtio-9p.h"
>>>   #include "fsdev/qemu-fsdev.h"
>>> -#include "virtio-9p-device.h"
>>>   #include "virtio-9p-xattr.h"
>>>   #include "virtio-9p-coth.h"
>>>   
>>>
Anthony Liguori April 9, 2013, 8:57 p.m. UTC | #9
KONRAD Frédéric <fred.konrad@greensocs.com> writes:

> On 09/04/2013 21:13, Anthony Liguori wrote:
>> Paolo Bonzini <pbonzini@redhat.com> writes:
>>
>>> Il 09/04/2013 10:22, Hans de Goede ha scritto:
>>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>>>> ---
>>>>   hw/9pfs/virtio-9p-device.c | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion
>>> Ouch, /me installs libcap-ng-devel.
>> On a fresh F18, I tried to find all the deps needed that can be
>> reasonably installed.  This is what I came up with:
>>
>> # yum install xen-devel iasl libfdt-devel libcap-ng-devel \
>>    spice-server-devel gnutls-devel cyrus-sasl-devel libjpeg-turbo-devel \
>>    libpng-devel uuid-devel xfsprogs-devel ncurses-devel brlapi-devel \
>>    libcurl-devel bluez-libs-devel libiscsi-devel libcap-ng-devel \
>>    spice-protocol SDL-devel libcap-devel usbredir-devel libseccomp-devel \
>>    ceph-devel
>>
>> Still missing GlusterFS, VDE, and iscsi.  F18 doesn't seem to
>> package these at appropriate versions.
>>
>> Regards,
>>
>> Anthony Liguori
> Isn't libattr-devel needed as well for virtio-9p?

I have CONFIG_VIRTFS=y without libattr-devel installed FWIW.

Regards,

Anthony Liguori

>
> I needed it to test my patch-set this morning.
>>
>>> Thanks.
>>>
>>> Paolo
>>>
>>>> diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
>>>> index 43f930e..b476b81 100644
>>>> --- a/hw/9pfs/virtio-9p-device.c
>>>> +++ b/hw/9pfs/virtio-9p-device.c
>>>> @@ -12,11 +12,11 @@
>>>>    */
>>>>   
>>>>   #include "hw/virtio/virtio.h"
>>>> +#include "hw/virtio/virtio-9p.h"
>>>>   #include "hw/i386/pc.h"
>>>>   #include "qemu/sockets.h"
>>>>   #include "virtio-9p.h"
>>>>   #include "fsdev/qemu-fsdev.h"
>>>> -#include "virtio-9p-device.h"
>>>>   #include "virtio-9p-xattr.h"
>>>>   #include "virtio-9p-coth.h"
>>>>   
>>>>
fred.konrad@greensocs.com April 9, 2013, 9:28 p.m. UTC | #10
On 09/04/2013 22:57, Anthony Liguori wrote:
> KONRAD Frédéric <fred.konrad@greensocs.com> writes:
>
>> On 09/04/2013 21:13, Anthony Liguori wrote:
>>> Paolo Bonzini <pbonzini@redhat.com> writes:
>>>
>>>> Il 09/04/2013 10:22, Hans de Goede ha scritto:
>>>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>>>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>>>>> ---
>>>>>    hw/9pfs/virtio-9p-device.c | 2 +-
>>>>>    1 file changed, 1 insertion(+), 1 deletion
>>>> Ouch, /me installs libcap-ng-devel.
>>> On a fresh F18, I tried to find all the deps needed that can be
>>> reasonably installed.  This is what I came up with:
>>>
>>> # yum install xen-devel iasl libfdt-devel libcap-ng-devel \
>>>     spice-server-devel gnutls-devel cyrus-sasl-devel libjpeg-turbo-devel \
>>>     libpng-devel uuid-devel xfsprogs-devel ncurses-devel brlapi-devel \
>>>     libcurl-devel bluez-libs-devel libiscsi-devel libcap-ng-devel \
>>>     spice-protocol SDL-devel libcap-devel usbredir-devel libseccomp-devel \
>>>     ceph-devel
>>>
>>> Still missing GlusterFS, VDE, and iscsi.  F18 doesn't seem to
>>> package these at appropriate versions.
>>>
>>> Regards,
>>>
>>> Anthony Liguori
>> Isn't libattr-devel needed as well for virtio-9p?
> I have CONFIG_VIRTFS=y without libattr-devel installed FWIW.
>
> Regards,
>
> Anthony Liguori

True, I just tested.

But when I launch the configure script without libcap-devel installed:

[konradf@localhost qemu]$ ./configure [...] --enable-virtfs

ERROR: VirtFS is supported only on Linux and requires libcap-devel and 
libattr-devel

That's why I installed it :).

>
>> I needed it to test my patch-set this morning.
>>>> Thanks.
>>>>
>>>> Paolo
>>>>
>>>>> diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
>>>>> index 43f930e..b476b81 100644
>>>>> --- a/hw/9pfs/virtio-9p-device.c
>>>>> +++ b/hw/9pfs/virtio-9p-device.c
>>>>> @@ -12,11 +12,11 @@
>>>>>     */
>>>>>    
>>>>>    #include "hw/virtio/virtio.h"
>>>>> +#include "hw/virtio/virtio-9p.h"
>>>>>    #include "hw/i386/pc.h"
>>>>>    #include "qemu/sockets.h"
>>>>>    #include "virtio-9p.h"
>>>>>    #include "fsdev/qemu-fsdev.h"
>>>>> -#include "virtio-9p-device.h"
>>>>>    #include "virtio-9p-xattr.h"
>>>>>    #include "virtio-9p-coth.h"
>>>>>    
>>>>>
Anthony Liguori April 15, 2013, 4:52 p.m. UTC | #11
Applied.  Thanks.

Regards,

Anthony Liguori
diff mbox

Patch

diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index 43f930e..b476b81 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -12,11 +12,11 @@ 
  */
 
 #include "hw/virtio/virtio.h"
+#include "hw/virtio/virtio-9p.h"
 #include "hw/i386/pc.h"
 #include "qemu/sockets.h"
 #include "virtio-9p.h"
 #include "fsdev/qemu-fsdev.h"
-#include "virtio-9p-device.h"
 #include "virtio-9p-xattr.h"
 #include "virtio-9p-coth.h"