On Sun, Dec 22, 2013 at 03:51:22PM +0100, Stefan Weil wrote:
> cgcc complains that -ENOSYS is not a good value for 'bool'.
> 
> A dummy virtio will never have pending queue entries, so let us return
> false.
> 
> Signed-off-by: Stefan Weil <s...@weilnetz.de>

Applied, thanks.

> ---
> 
> Could we also use g_assert_not_reached or hw_error in those dummy functions?
> 
> Regards
> Stefan

I'd go for g_assert_not_reached normally - it's an internal
bug if this is called since init stub fails.
Or leave it as is - it's an unusual configuration.

>  hw/net/vhost_net.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
> index 006576d..854997d 100644
> --- a/hw/net/vhost_net.c
> +++ b/hw/net/vhost_net.c
> @@ -321,7 +321,7 @@ void vhost_net_ack_features(struct vhost_net *net, 
> unsigned features)
>  
>  bool vhost_net_virtqueue_pending(VHostNetState *net, int idx)
>  {
> -    return -ENOSYS;
> +    return false;
>  }
>  
>  void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev,
> -- 
> 1.7.10.4

Reply via email to