Revision 07a54d70
b/spice-qemu-char.c | ||
---|---|---|
14 | 14 |
} \ |
15 | 15 |
} while (0) |
16 | 16 |
|
17 |
#define VMC_MAX_HOST_WRITE 2048 |
|
18 |
|
|
19 | 17 |
typedef struct SpiceCharDriver { |
20 | 18 |
CharDriverState* chr; |
21 | 19 |
SpiceCharDeviceInstance sin; |
... | ... | |
35 | 33 |
uint8_t* p = (uint8_t*)buf; |
36 | 34 |
|
37 | 35 |
while (len > 0) { |
38 |
last_out = MIN(len, VMC_MAX_HOST_WRITE);
|
|
39 |
if (qemu_chr_be_can_write(scd->chr) < last_out) {
|
|
36 |
last_out = MIN(len, qemu_chr_be_can_write(scd->chr));
|
|
37 |
if (last_out <= 0) {
|
|
40 | 38 |
break; |
41 | 39 |
} |
42 | 40 |
qemu_chr_be_write(scd->chr, p, last_out); |
Also available in: Unified diff