diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-09-18 13:59:03 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-09-19 15:26:29 +0200 |
commit | 0ddf08db22a9ef6b122d8c4cfe5b25d2c2c51962 (patch) | |
tree | dcb0d20b2d886dc2111edb98228726d741b15333 /nbd.h | |
parent | 4b9441f6b3565ba6affa95141590cd2be4ae0cd9 (diff) |
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>
Diffstat (limited to 'nbd.h')
-rw-r--r-- | nbd.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -79,7 +79,8 @@ typedef struct NBDExport NBDExport; typedef struct NBDClient NBDClient; NBDExport *nbd_export_new(BlockDriverState *bs, off_t dev_offset, - off_t size, uint32_t nbdflags); + off_t size, uint32_t nbdflags, + void (*close)(NBDExport *)); void nbd_export_close(NBDExport *exp); void nbd_export_get(NBDExport *exp); void nbd_export_put(NBDExport *exp); |