summaryrefslogtreecommitdiffstats
path: root/include/block/nbd.h
diff options
context:
space:
mode:
authorFam Zheng2016-01-14 09:41:01 +0100
committerPaolo Bonzini2016-01-15 18:58:01 +0100
commitee7d7aabdaea4484e069cb99c9fc54e8cb24b56f (patch)
treeda85bcfd0c1092c266629d6afd9d75d59c98eea0 /include/block/nbd.h
parentSCSI device: fix to incomplete QOMify (diff)
downloadqemu-ee7d7aabdaea4484e069cb99c9fc54e8cb24b56f.tar.gz
qemu-ee7d7aabdaea4484e069cb99c9fc54e8cb24b56f.tar.xz
qemu-ee7d7aabdaea4484e069cb99c9fc54e8cb24b56f.zip
nbd: Always call "close_fn" in nbd_client_new
Rename the parameter "close" to "close_fn" to disambiguous with close(2). This unifies error handling paths of NBDClient allocation: nbd_client_new will shutdown the socket and call the "close_fn" callback if negotiation failed, so the caller don't need a different path than the normal close. The returned pointer is never used, make it void in preparation for the next patch. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <1452760863-25350-2-git-send-email-famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/block/nbd.h')
-rw-r--r--include/block/nbd.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/block/nbd.h b/include/block/nbd.h
index 65f409d804..7eccb41da8 100644
--- a/include/block/nbd.h
+++ b/include/block/nbd.h
@@ -98,8 +98,7 @@ NBDExport *nbd_export_find(const char *name);
void nbd_export_set_name(NBDExport *exp, const char *name);
void nbd_export_close_all(void);
-NBDClient *nbd_client_new(NBDExport *exp, int csock,
- void (*close)(NBDClient *));
+void nbd_client_new(NBDExport *exp, int csock, void (*close_fn)(NBDClient *));
void nbd_client_get(NBDClient *client);
void nbd_client_put(NBDClient *client);