From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQgOK-0002YM-Qw for qemu-devel@nongnu.org; Wed, 25 Feb 2015 13:09:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQgOG-0001gL-3g for qemu-devel@nongnu.org; Wed, 25 Feb 2015 13:09:00 -0500 From: Max Reitz Date: Wed, 25 Feb 2015 13:08:17 -0500 Message-Id: <1424887718-10800-5-git-send-email-mreitz@redhat.com> In-Reply-To: <1424887718-10800-1-git-send-email-mreitz@redhat.com> References: <1424887718-10800-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH 04/25] nbd: Fix response to invalid requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , qemu-devel@nongnu.org, Stefan Hajnoczi , Max Reitz reply.error is a positive errno value, not a negative one. Signed-off-by: Max Reitz --- nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nbd.c b/nbd.c index 5d50f22..b4776ce 100644 --- a/nbd.c +++ b/nbd.c @@ -1330,7 +1330,7 @@ static void nbd_trip(void *opaque) default: LOG("invalid request type (%u) received", request.type); invalid_request: - reply.error = -EINVAL; + reply.error = EINVAL; error_reply: if (nbd_co_send_reply(req, &reply, 0) < 0) { goto out; -- 2.1.0