Skip to content
  • Hanna Reitz's avatar
    1ce52846
    nbd: Improve error messages · 1ce52846
    Hanna Reitz authored
    
    
    This patch makes use of the Error object for nbd_receive_negotiate() so
    that errors during negotiation look nicer.
    
    Furthermore, this patch adds an additional error message if the received
    magic was wrong, but would be correct for the other protocol version,
    respectively: So if an export name was specified, but the NBD server
    magic corresponds to an old handshake, this condition is explicitly
    signaled to the user, and vice versa.
    
    As these messages are now part of the "Could not open image" error
    message, additional filtering has to be employed in iotest 083, which
    this patch does as well.
    
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    1ce52846
    nbd: Improve error messages
    Hanna Reitz authored
    
    
    This patch makes use of the Error object for nbd_receive_negotiate() so
    that errors during negotiation look nicer.
    
    Furthermore, this patch adds an additional error message if the received
    magic was wrong, but would be correct for the other protocol version,
    respectively: So if an export name was specified, but the NBD server
    magic corresponds to an old handshake, this condition is explicitly
    signaled to the user, and vice versa.
    
    As these messages are now part of the "Could not open image" error
    message, additional filtering has to be employed in iotest 083, which
    this patch does as well.
    
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading