flexnbd: Make the killswitch runtime-selectable

We're not actually using it in production right now because it doesn't
shut its sockets down cleanly enough. This is a better option than
reverting the functionality or keeping production downgraded until
we sort out a handler that cleanly closes the sockets.
This commit is contained in:
nick
2013-07-03 09:56:35 +01:00
parent 81d41f567d
commit 9f34752842
8 changed files with 36 additions and 9 deletions

View File

@@ -22,6 +22,7 @@ void mode(char* mode, int argc, char **argv);
#define OPT_UNLINK "unlink"
#define OPT_CONNECT_ADDR "conn-addr"
#define OPT_CONNECT_PORT "conn-port"
#define OPT_KILLSWITCH "killswitch"
#define CMD_SERVE "serve"
#define CMD_LISTEN "listen"
@@ -52,6 +53,7 @@ void mode(char* mode, int argc, char **argv);
#define GETOPT_UNLINK GETOPT_ARG( OPT_UNLINK, 'u' )
#define GETOPT_CONNECT_ADDR GETOPT_ARG( OPT_CONNECT_ADDR, 'C' )
#define GETOPT_CONNECT_PORT GETOPT_ARG( OPT_CONNECT_PORT, 'P' )
#define GETOPT_KILLSWITCH GETOPT_ARG( OPT_KILLSWITCH, 'k' )
#define OPT_VERBOSE "verbose"
#define SOPT_VERBOSE "v"