nbd: add notification for closing an NBDExport

In order to exit cleanly from qemu-nbd, add a callback that triggers
when an NBDExport is closed.  In the case of qemu-nbd it will exit the
main loop.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2012-09-18 13:59:03 +02:00
parent 4b9441f6b3
commit 0ddf08db22
3 changed files with 12 additions and 3 deletions

View file

@ -546,7 +546,7 @@ int main(int argc, char **argv)
}
}
exp = nbd_export_new(bs, dev_offset, fd_size, nbdflags);
exp = nbd_export_new(bs, dev_offset, fd_size, nbdflags, NULL);
if (sockpath) {
fd = unix_socket_incoming(sockpath);