OSDN Git Service

nbd: Fix nbd_establish_connection()'s return value
authorMax Reitz <mreitz@redhat.com>
Wed, 25 Feb 2015 18:08:16 +0000 (13:08 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 18 Mar 2015 11:05:38 +0000 (12:05 +0100)
commit2b1f13b996c3a278ed3d4bf4ce0893f3506fb7cc
treef1e037533c7f2aefae8d8b3a06412b214a7757ce
parent453b07b13443713f6a632005977c7ccab17e135d
nbd: Fix nbd_establish_connection()'s return value

unix_connect_opts() and inet_connect_opts() do not necessarily set errno
(if at all); therefore, nbd_establish_connection() should not literally
return -errno on error.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-4-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block/nbd.c