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

[PATCH] proto: document use of NBD_REP_ERR_PLATFORM



Hi,

When I implemented TLS support into nbd-server, I made it send
NBD_REP_ERR_PLATFORM to the client if it asked for TLS support and that
was disabled at compile time. I think this is a valid use for that error
message (which is otherwise not ever used), and I think I should update
the docs to account for it.

What do other people think?

Thanks,

>From 590fc470ff08dab5969f9c7f6851a2e30d9f9353 Mon Sep 17 00:00:00 2001
From: Wouter Verhelst <w@uter.be>
Date: Tue, 31 Dec 2019 17:31:02 +0200
Subject: [PATCH] NBD_REP_ERR_PLATFORM: make useful

"not available on this platform" is rather weird, and probably too narrow a
choice. "not enabled at compile time" might be slightly more useful, and
nbd-server uses that for STARTTLS when it was disabled currently.

This might be a good idea, so explicitly allow for it.
---
 doc/proto.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/proto.md b/doc/proto.md
index fc7baf6..be83b78 100644
--- a/doc/proto.md
+++ b/doc/proto.md
@@ -1582,7 +1582,8 @@ case that data is an error message string suitable for display to the user.
 * `NBD_REP_ERR_PLATFORM` (2^31 + 4)
 
     The option sent by the client is not supported on the platform on
-    which the server is running. Not currently used.
+    which the server is running, or requires compile-time options that
+    were disabled, e.g., upon trying to use TLS.
 
 * `NBD_REP_ERR_TLS_REQD` (2^31 + 5)
 
-- 
2.20.1


-- 
<Lo-lan-do> Home is where you have to wash the dishes.
  -- #debian-devel, Freenode, 2004-09-22


Reply to: