On 12/4/19 9:45 PM, [email protected] wrote:
From: Pan Nengyuan <[email protected]>
The BDRVNBDState cleanup code is common in two places, add
nbd_clear_bdrvstate() function to do these cleanups.
Signed-off-by: Stefano Garzarella <[email protected]>
Signed-off-by: Pan Nengyuan <[email protected]>
Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
---
+++ b/block/nbd.c
@@ -94,6 +94,19 @@ typedef struct BDRVNBDState {
static int nbd_client_connect(BlockDriverState *bs, Error **errp);
+void nbd_clear_bdrvstate(BDRVNBDState *s)
+{
Compilation fails if this is not static (no prior prototype). I've
fixed that and now queued this series in my NBD tree, pull request
coming soon.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org