diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2015-03-17 17:11:33 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2015-03-17 17:11:33 +0000 |
| commit | d8e33fc98081b548b25be9458490c40858480344 (patch) | |
| tree | 023e27a7a70c9319fd17b7e543e324284ce9d864 /migration/qemu-file-buf.c | |
| parent | ac738eadc409813c5fbb37dae8d254cb5664733a (diff) | |
| parent | cde63fbed86e20dda98bf35025faedd994918f00 (diff) | |
| download | focaccia-qemu-d8e33fc98081b548b25be9458490c40858480344.tar.gz focaccia-qemu-d8e33fc98081b548b25be9458490c40858480344.zip | |
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20150317' into staging
migration/next for 20150317 # gpg: Signature made Tue Mar 17 14:21:14 2015 GMT using RSA key ID 5872D723 # gpg: Can't check signature: public key not found * remotes/juanquintela/tags/migration/20150317: migration: Expose 'cancelling' status to user migration: Convert 'status' of MigrationInfo to use an enum type hmp: Rename 'MigrationStatus' to 'HMPMigrationStatus' migration: Rename abbreviated macro MIG_STATE_* to MIGRATION_STATUS_* migration: Remove unused functions arch_init: Count the total number of pages by using helper function migrate_incoming: Cleanup/clarify error messages Warn against the use of the string as uri parameter to migrate-incoming migrate_incoming: use hmp_handle_error migration: Fix remaining 32 bit compiler errors migration: Fix some 32 bit compiler errors migration/rdma: clean up qemu_rdma_dest_init a bit migration: Avoid qerror_report_err() outside QMP command handlers Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'migration/qemu-file-buf.c')
| -rw-r--r-- | migration/qemu-file-buf.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/migration/qemu-file-buf.c b/migration/qemu-file-buf.c index e56a8ad1e0..16a51a1e17 100644 --- a/migration/qemu-file-buf.c +++ b/migration/qemu-file-buf.c @@ -365,37 +365,6 @@ ssize_t qsb_write_at(QEMUSizedBuffer *qsb, const uint8_t *source, return count; } -/** - * Create a deep copy of the given QEMUSizedBuffer. - * - * @qsb: A QEMUSizedBuffer - * - * Returns a clone of @qsb or NULL on allocation failure - */ -QEMUSizedBuffer *qsb_clone(const QEMUSizedBuffer *qsb) -{ - QEMUSizedBuffer *out = qsb_create(NULL, qsb_get_length(qsb)); - size_t i; - ssize_t res; - off_t pos = 0; - - if (!out) { - return NULL; - } - - for (i = 0; i < qsb->n_iov; i++) { - res = qsb_write_at(out, qsb->iov[i].iov_base, - pos, qsb->iov[i].iov_len); - if (res < 0) { - qsb_free(out); - return NULL; - } - pos += res; - } - - return out; -} - typedef struct QEMUBuffer { QEMUSizedBuffer *qsb; QEMUFile *file; |