We add qemu_peek_buffer, that is identical to qemu_get_buffer, just
that it don't update f->buf_index.
We add a paramenter to qemu_peek_byte() to be able to peek more than
one byte.
Once this is done, to see if we have a subsection we look:
- 1st byte is QEMU_VM_SUBSECTION
- 2nd byte is a length,
We add qemu_peek_buffer, that is identical to qemu_get_buffer, just
that it don't update f->buf_index.
We add a paramenter to qemu_peek_byte() to be able to peek more than
one byte.
Once this is done, to see if we have a subsection we look:
- 1st byte is QEMU_VM_SUBSECTION
- 2nd byte is a length,
On 10/07/2011 12:42 AM, Juan Quintela wrote:
> This changes semantics for reads above 32KB. It should be in the
> commit message, or preferably v1 could be committed instead.:)
how it changes? My understanding is that we read the same, only change
that I can think of is the one that I have j
Paolo Bonzini wrote:
> On 10/06/2011 06:21 PM, Juan Quintela wrote:
>> +
>> +int qemu_get_buffer(QEMUFile *f, uint8_t *buf, int size)
>> +{
>> +int pending = size;
>> +int done = 0;
>> +
>> +while (pending> 0) {
>> +int res;
>> +
>> +res = qemu_peek_buffer(f, buf, pend
On 10/06/2011 06:21 PM, Juan Quintela wrote:
+
+int qemu_get_buffer(QEMUFile *f, uint8_t *buf, int size)
+{
+int pending = size;
+int done = 0;
+
+while (pending> 0) {
+int res;
+
+res = qemu_peek_buffer(f, buf, pending, 0);
+if (res == 0) {
+retur
We add qemu_peek_buffer, that is identical to qemu_get_buffer, just
that it don't update f->buf_index.
We add a paramenter to qemu_peek_byte() to be able to peek more than
one byte.
Once this is done, to see if we have a subsection we look:
- 1st byte is QEMU_VM_SUBSECTION
- 2nd byte is a length,