nbd-client: support newstyle protocol, -b, -d, -p, -N
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 24 Oct 2018 13:51:38 +0000 (15:51 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 24 Oct 2018 13:52:04 +0000 (15:52 +0200)
commit4329116b6d036b19a92cabf51dc388fab4787b53
tree1287594a471f4ca12490acdd1d27718e95827ca0
parent3db4e7f84cf795de8559ea0d96eaa491999ccf24
nbd-client: support newstyle protocol, -b, -d, -p, -N

Recognize the "newstyle" protocol and switch to it automatically.
Add options for setting blocksize (-b) and for disconnecting
a nbd device (-d).

function                                             old     new   delta
nbdclient_main                                       492    1179    +687
static.long_options                                    -      80     +80
print_direc                                          438     457     +19
brctl_main                                          1169    1183     +14
bb_strtoll                                            84      89      +5
packed_usage                                       33082   33066     -16
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/1 up/down: 805/-16)           Total: 789 bytes

Signed-off-by: Elvira Khabirova <lineprinter@altlinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/nbd-client.c