#include "ui/qemu-spice.h"
#define READ_BUF_LEN 4096
-#define CBUFF_SIZE 65536
/***********************************************************/
/* character device */
chr = g_malloc0(sizeof(CharDriverState));
d = g_malloc(sizeof(*d));
- d->size = qemu_opt_get_number(opts, "size", 0);
+ d->size = qemu_opt_get_size(opts, "size", 0);
if (d->size == 0) {
- d->size = CBUFF_SIZE;
+ d->size = 65536;
}
/* The size must be power of 2 */
.type = QEMU_OPT_NUMBER,
},{
.name = "size",
- .type = QEMU_OPT_NUMBER,
+ .type = QEMU_OPT_SIZE,
},
{ /* end of list */ }
},