char: rename qemu_chr_read() -> qemu_chr_be_write()

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Anthony Liguori 2011-08-15 11:17:30 -05:00
parent e7e71b0ec6
commit fa5efccb2a
7 changed files with 18 additions and 18 deletions

View file

@ -231,12 +231,12 @@ static void baum_accept_input(struct CharDriverState *chr)
first = BUF_SIZE - baum->out_buf_ptr;
if (room > first) {
qemu_chr_read(chr, baum->out_buf + baum->out_buf_ptr, first);
qemu_chr_be_write(chr, baum->out_buf + baum->out_buf_ptr, first);
baum->out_buf_ptr = 0;
baum->out_buf_used -= first;
room -= first;
}
qemu_chr_read(chr, baum->out_buf + baum->out_buf_ptr, room);
qemu_chr_be_write(chr, baum->out_buf + baum->out_buf_ptr, room);
baum->out_buf_ptr += room;
baum->out_buf_used -= room;
}
@ -254,12 +254,12 @@ static void baum_write_packet(BaumDriverState *baum, const uint8_t *buf, int len
len = cur - io_buf;
if (len <= room) {
/* Fits */
qemu_chr_read(baum->chr, io_buf, len);
qemu_chr_be_write(baum->chr, io_buf, len);
} else {
int first;
uint8_t out;
/* Can't fit all, send what can be, and store the rest. */
qemu_chr_read(baum->chr, io_buf, room);
qemu_chr_be_write(baum->chr, io_buf, room);
len -= room;
cur = io_buf + room;
if (len > BUF_SIZE - baum->out_buf_used) {