flexnbd: Remove some obsolete 'rebind' options

They steal short options that I want for other things
This commit is contained in:
nick
2013-02-13 13:11:20 +00:00
parent f63be84d80
commit 0fcbe04f80
3 changed files with 4 additions and 8 deletions

View File

@@ -12,10 +12,8 @@ void mode(char* mode, int argc, char **argv);
#define OPT_HELP "help"
#define OPT_ADDR "addr"
#define OPT_REBIND_ADDR "rebind-addr"
#define OPT_BIND "bind"
#define OPT_PORT "port"
#define OPT_REBIND_PORT "rebind-port"
#define OPT_FILE "file"
#define OPT_SOCK "sock"
#define OPT_FROM "from"
@@ -44,9 +42,7 @@ void mode(char* mode, int argc, char **argv);
#define GETOPT_DENY GETOPT_FLAG( OPT_DENY, 'd' )
#define GETOPT_ADDR GETOPT_ARG( OPT_ADDR, 'l' )
#define GETOPT_REBIND_ADDR GETOPT_ARG( OPT_REBIND_ADDR, 'L')
#define GETOPT_PORT GETOPT_ARG( OPT_PORT, 'p' )
#define GETOPT_REBIND_PORT GETOPT_ARG( OPT_REBIND_PORT, 'P')
#define GETOPT_FILE GETOPT_ARG( OPT_FILE, 'f' )
#define GETOPT_SOCK GETOPT_ARG( OPT_SOCK, 's' )
#define GETOPT_FROM GETOPT_ARG( OPT_FROM, 'F' )
@@ -86,3 +82,4 @@ void mode(char* mode, int argc, char **argv);
char * help_help_text;
#endif

View File

@@ -5,7 +5,7 @@ require 'file_writer'
class Environment
attr_reader( :blocksize, :filename1, :filename2, :ip,
:port1, :port2, :nbd1, :nbd2, :file1, :file2, :rebind_port1 )
:port1, :port2, :nbd1, :nbd2, :file1, :file2 )
def initialize
@blocksize = 1024
@@ -14,9 +14,7 @@ class Environment
@ip = "127.0.0.1"
@available_ports = [*40000..41000] - listening_ports
@port1 = @available_ports.shift
@rebind_port1 = @available_ports.shift
@port2 = @available_ports.shift
@rebind_port2 = @available_ports.shift
@nbd1 = FlexNBD::FlexNBD.new("../../build/flexnbd", @ip, @port1)
@nbd2 = FlexNBD::FlexNBD.new("../../build/flexnbd", @ip, @port2)

View File

@@ -8,7 +8,7 @@
require 'flexnbd/fake_source'
include FlexNBD
addr, port, srv_pid, rebind_addr, rebind_port = *ARGV
addr, port, srv_pid = *ARGV
client = FakeSource.new( addr, port, "Timed out connecting" )
client.read_hello
@@ -30,3 +30,4 @@ rescue Timeout::Error
end
exit(0)