diff mbox series

[v2,066/109] vhost-user: Print unexpected slave message types

Message ID 20200121122433.50803-67-dgilbert@redhat.com
State New
Headers show
Series virtiofs daemon [all] | expand

Commit Message

Dr. David Alan Gilbert Jan. 21, 2020, 12:23 p.m. UTC
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

When we receive an unexpected message type on the slave fd, print
the type.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
 hw/virtio/vhost-user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé Jan. 22, 2020, 3:41 p.m. UTC | #1
On 1/21/20 1:23 PM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> When we receive an unexpected message type on the slave fd, print
> the type.
> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   hw/virtio/vhost-user.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index d27a10fcc6..9ec8c2a27c 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -1061,7 +1061,7 @@ static void slave_read(void *opaque)
>                                                             fd[0]);
>           break;
>       default:
> -        error_report("Received unexpected msg type.");
> +        error_report("Received unexpected msg type. (%d)", hdr.request);

With either "Received unexpected msg type (%d)."
or "Received unexpected msg type: %d." instead:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

>           ret = -EINVAL;
>       }
>   
>
Dr. David Alan Gilbert Jan. 22, 2020, 4 p.m. UTC | #2
* Philippe Mathieu-Daudé (philmd@redhat.com) wrote:
> On 1/21/20 1:23 PM, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > 
> > When we receive an unexpected message type on the slave fd, print
> > the type.
> > 
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >   hw/virtio/vhost-user.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> > index d27a10fcc6..9ec8c2a27c 100644
> > --- a/hw/virtio/vhost-user.c
> > +++ b/hw/virtio/vhost-user.c
> > @@ -1061,7 +1061,7 @@ static void slave_read(void *opaque)
> >                                                             fd[0]);
> >           break;
> >       default:
> > -        error_report("Received unexpected msg type.");
> > +        error_report("Received unexpected msg type. (%d)", hdr.request);
> 
> With either "Received unexpected msg type (%d)."
> or "Received unexpected msg type: %d." instead:

OK.

> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Thanks.

> >           ret = -EINVAL;
> >       }
> > 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
diff mbox series

Patch

diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index d27a10fcc6..9ec8c2a27c 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -1061,7 +1061,7 @@  static void slave_read(void *opaque)
                                                           fd[0]);
         break;
     default:
-        error_report("Received unexpected msg type.");
+        error_report("Received unexpected msg type. (%d)", hdr.request);
         ret = -EINVAL;
     }