qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PATCH 04/25] nbd: Fix response to invalid requests


From: Max Reitz
Subject: [Qemu-block] [PATCH 04/25] nbd: Fix response to invalid requests
Date: Wed, 25 Feb 2015 13:08:17 -0500

reply.error is a positive errno value, not a negative one.

Signed-off-by: Max Reitz <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]