Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are the raw update to qemu-2.6.
[kvmfornfv.git]
/
qemu
/
migration
/
qemu-file-buf.c
diff --git
a/qemu/migration/qemu-file-buf.c
b/qemu/migration/qemu-file-buf.c
index
2de9330
..
7b8e78e
100644
(file)
--- a/
qemu/migration/qemu-file-buf.c
+++ b/
qemu/migration/qemu-file-buf.c
@@
-25,11
+25,12
@@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "qemu/iov.h"
#include "qemu/sockets.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "qemu/iov.h"
#include "qemu/sockets.h"
-#include "
block
/coroutine.h"
+#include "
qemu
/coroutine.h"
#include "migration/migration.h"
#include "migration/qemu-file.h"
#include "migration/qemu-file-internal.h"
#include "migration/migration.h"
#include "migration/qemu-file.h"
#include "migration/qemu-file-internal.h"
@@
-372,7
+373,8
@@
typedef struct QEMUBuffer {
bool qsb_allocated;
} QEMUBuffer;
bool qsb_allocated;
} QEMUBuffer;
-static int buf_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size)
+static ssize_t buf_get_buffer(void *opaque, uint8_t *buf, int64_t pos,
+ size_t size)
{
QEMUBuffer *s = opaque;
ssize_t len = qsb_get_length(s->qsb) - pos;
{
QEMUBuffer *s = opaque;
ssize_t len = qsb_get_length(s->qsb) - pos;
@@
-387,8
+389,8
@@
static int buf_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size)
return qsb_get_buffer(s->qsb, pos, len, buf);
}
return qsb_get_buffer(s->qsb, pos, len, buf);
}
-static
in
t buf_put_buffer(void *opaque, const uint8_t *buf,
-
int64_t pos, in
t size)
+static
ssize_
t buf_put_buffer(void *opaque, const uint8_t *buf,
+
int64_t pos, size_
t size)
{
QEMUBuffer *s = opaque;
{
QEMUBuffer *s = opaque;
@@
-439,7
+441,7
@@
QEMUFile *qemu_bufopen(const char *mode, QEMUSizedBuffer *input)
return NULL;
}
return NULL;
}
- s = g_
malloc0(sizeof(QEMUBuffer)
);
+ s = g_
new0(QEMUBuffer, 1
);
s->qsb = input;
if (s->qsb == NULL) {
s->qsb = input;
if (s->qsb == NULL) {