Message ID | 1460153158-21612-5-git-send-email-eblake@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 8 Apr 2016, at 23:05, Eric Blake <eblake@redhat.com> wrote: > Add some debugging to flag servers that are not compliant to > the NBD protocol. > > Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Alex Bligh <alex@alex.org.uk> > --- > nbd/client.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/nbd/client.c b/nbd/client.c > index 42e4e52..c834587 100644 > --- a/nbd/client.c > +++ b/nbd/client.c > @@ -33,8 +33,10 @@ static int nbd_errno_to_system_errno(int err) > return ENOMEM; > case NBD_ENOSPC: > return ENOSPC; > + default: > + TRACE("Squashing unexpected error %d to EINVAL", err); > + /* fallthrough */ > case NBD_EINVAL: > - default: > return EINVAL; > } > } > -- > 2.5.5 > >
diff --git a/nbd/client.c b/nbd/client.c index 42e4e52..c834587 100644 --- a/nbd/client.c +++ b/nbd/client.c @@ -33,8 +33,10 @@ static int nbd_errno_to_system_errno(int err) return ENOMEM; case NBD_ENOSPC: return ENOSPC; + default: + TRACE("Squashing unexpected error %d to EINVAL", err); + /* fallthrough */ case NBD_EINVAL: - default: return EINVAL; } }
Add some debugging to flag servers that are not compliant to the NBD protocol. Signed-off-by: Eric Blake <eblake@redhat.com> --- nbd/client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)