Skip to content
  • Eric Blake's avatar
    6dc1667d
    nbd/client: Move export name into NBDExportInfo · 6dc1667d
    Eric Blake authored
    
    
    Refactor the 'name' parameter of nbd_receive_negotiate() from
    being a separate parameter into being part of the in-out 'info'.
    This also spills over to a simplification of nbd_opt_go().
    
    The main driver for this refactoring is that an upcoming patch
    would like to add support to qemu-nbd to list information about
    all exports available on a server, where the name(s) will be
    provided by the server instead of the client.  But another benefit
    is that we can now allow the client to explicitly specify the
    empty export name "" even when connecting to an oldstyle server
    (even if qemu is no longer such a server after commit 7f7dfe2a).
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarRichard W.M. Jones <rjones@redhat.com>
    Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Message-Id: <20190117193658.16413-10-eblake@redhat.com>
    6dc1667d
    nbd/client: Move export name into NBDExportInfo
    Eric Blake authored
    
    
    Refactor the 'name' parameter of nbd_receive_negotiate() from
    being a separate parameter into being part of the in-out 'info'.
    This also spills over to a simplification of nbd_opt_go().
    
    The main driver for this refactoring is that an upcoming patch
    would like to add support to qemu-nbd to list information about
    all exports available on a server, where the name(s) will be
    provided by the server instead of the client.  But another benefit
    is that we can now allow the client to explicitly specify the
    empty export name "" even when connecting to an oldstyle server
    (even if qemu is no longer such a server after commit 7f7dfe2a).
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarRichard W.M. Jones <rjones@redhat.com>
    Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Message-Id: <20190117193658.16413-10-eblake@redhat.com>
Loading