Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
fa5efccb
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fa5efccb
编写于
8月 15, 2011
作者:
A
Anthony Liguori
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
char: rename qemu_chr_read() -> qemu_chr_be_write()
Signed-off-by:
N
Anthony Liguori
<
aliguori@us.ibm.com
>
上级
e7e71b0e
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
18 addition
and
18 deletion
+18
-18
console.c
console.c
+1
-1
gdbstub.c
gdbstub.c
+1
-1
hw/baum.c
hw/baum.c
+4
-4
hw/msmouse.c
hw/msmouse.c
+1
-1
qemu-char.c
qemu-char.c
+9
-9
qemu-char.h
qemu-char.h
+1
-1
spice-qemu-char.c
spice-qemu-char.c
+1
-1
未找到文件。
console.c
浏览文件 @
fa5efccb
...
...
@@ -1130,7 +1130,7 @@ static void kbd_send_chars(void *opaque)
if
(
len
>
sizeof
(
buf
))
len
=
sizeof
(
buf
);
qemu_fifo_read
(
&
s
->
out_fifo
,
buf
,
len
);
qemu_chr_
read
(
s
->
chr
,
buf
,
len
);
qemu_chr_
be_write
(
s
->
chr
,
buf
,
len
);
}
/* characters are pending: we send them a bit later (XXX:
horrible, should change char device API) */
...
...
gdbstub.c
浏览文件 @
fa5efccb
...
...
@@ -2194,7 +2194,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
hextomem
(
mem_buf
,
p
+
5
,
len
);
len
=
len
/
2
;
mem_buf
[
len
++
]
=
0
;
qemu_chr_
read
(
s
->
mon_chr
,
mem_buf
,
len
);
qemu_chr_
be_write
(
s
->
mon_chr
,
mem_buf
,
len
);
put_packet
(
s
,
"OK"
);
break
;
}
...
...
hw/baum.c
浏览文件 @
fa5efccb
...
...
@@ -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
)
{
...
...
hw/msmouse.c
浏览文件 @
fa5efccb
...
...
@@ -50,7 +50,7 @@ static void msmouse_event(void *opaque,
/* We always send the packet of, so that we do not have to keep track
of previous state of the middle button. This can potentially confuse
some very old drivers for two button mice though. */
qemu_chr_
read
(
chr
,
bytes
,
4
);
qemu_chr_
be_write
(
chr
,
bytes
,
4
);
}
static
int
msmouse_chr_write
(
struct
CharDriverState
*
s
,
const
uint8_t
*
buf
,
int
len
)
...
...
qemu-char.c
浏览文件 @
fa5efccb
...
...
@@ -158,7 +158,7 @@ int qemu_chr_can_read(CharDriverState *s)
return
s
->
chr_can_read
(
s
->
handler_opaque
);
}
void
qemu_chr_
read
(
CharDriverState
*
s
,
uint8_t
*
buf
,
int
len
)
void
qemu_chr_
be_write
(
CharDriverState
*
s
,
uint8_t
*
buf
,
int
len
)
{
s
->
chr_read
(
s
->
handler_opaque
,
buf
,
len
);
}
...
...
@@ -589,7 +589,7 @@ static void fd_chr_read(void *opaque)
return
;
}
if
(
size
>
0
)
{
qemu_chr_
read
(
chr
,
buf
,
size
);
qemu_chr_
be_write
(
chr
,
buf
,
size
);
}
}
...
...
@@ -700,7 +700,7 @@ static int stdio_read_poll(void *opaque)
/* try to flush the queue if needed */
if
(
term_fifo_size
!=
0
&&
qemu_chr_can_read
(
chr
)
>
0
)
{
qemu_chr_
read
(
chr
,
term_fifo
,
1
);
qemu_chr_
be_write
(
chr
,
term_fifo
,
1
);
term_fifo_size
=
0
;
}
/* see if we can absorb more chars */
...
...
@@ -725,7 +725,7 @@ static void stdio_read(void *opaque)
}
if
(
size
>
0
)
{
if
(
qemu_chr_can_read
(
chr
)
>
0
)
{
qemu_chr_
read
(
chr
,
buf
,
1
);
qemu_chr_
be_write
(
chr
,
buf
,
1
);
}
else
if
(
term_fifo_size
==
0
)
{
term_fifo
[
term_fifo_size
++
]
=
buf
[
0
];
}
...
...
@@ -914,7 +914,7 @@ static void pty_chr_read(void *opaque)
}
if
(
size
>
0
)
{
pty_chr_state
(
chr
,
1
);
qemu_chr_
read
(
chr
,
buf
,
size
);
qemu_chr_
be_write
(
chr
,
buf
,
size
);
}
}
...
...
@@ -1624,7 +1624,7 @@ static void win_chr_readfile(CharDriverState *chr)
}
if
(
size
>
0
)
{
qemu_chr_
read
(
chr
,
buf
,
size
);
qemu_chr_
be_write
(
chr
,
buf
,
size
);
}
}
...
...
@@ -1846,7 +1846,7 @@ static int udp_chr_read_poll(void *opaque)
* first
*/
while
(
s
->
max_size
>
0
&&
s
->
bufptr
<
s
->
bufcnt
)
{
qemu_chr_
read
(
chr
,
&
s
->
buf
[
s
->
bufptr
],
1
);
qemu_chr_
be_write
(
chr
,
&
s
->
buf
[
s
->
bufptr
],
1
);
s
->
bufptr
++
;
s
->
max_size
=
qemu_chr_can_read
(
chr
);
}
...
...
@@ -1867,7 +1867,7 @@ static void udp_chr_read(void *opaque)
s
->
bufptr
=
0
;
while
(
s
->
max_size
>
0
&&
s
->
bufptr
<
s
->
bufcnt
)
{
qemu_chr_
read
(
chr
,
&
s
->
buf
[
s
->
bufptr
],
1
);
qemu_chr_
be_write
(
chr
,
&
s
->
buf
[
s
->
bufptr
],
1
);
s
->
bufptr
++
;
s
->
max_size
=
qemu_chr_can_read
(
chr
);
}
...
...
@@ -2109,7 +2109,7 @@ static void tcp_chr_read(void *opaque)
if
(
s
->
do_telnetopt
)
tcp_chr_process_IAC_bytes
(
chr
,
s
,
buf
,
&
size
);
if
(
size
>
0
)
qemu_chr_
read
(
chr
,
buf
,
size
);
qemu_chr_
be_write
(
chr
,
buf
,
size
);
}
}
...
...
qemu-char.h
浏览文件 @
fa5efccb
...
...
@@ -97,7 +97,7 @@ void qemu_chr_add_handlers(CharDriverState *s,
int
qemu_chr_ioctl
(
CharDriverState
*
s
,
int
cmd
,
void
*
arg
);
void
qemu_chr_generic_open
(
CharDriverState
*
s
);
int
qemu_chr_can_read
(
CharDriverState
*
s
);
void
qemu_chr_
read
(
CharDriverState
*
s
,
uint8_t
*
buf
,
int
len
);
void
qemu_chr_
be_write
(
CharDriverState
*
s
,
uint8_t
*
buf
,
int
len
);
int
qemu_chr_get_msgfd
(
CharDriverState
*
s
);
void
qemu_chr_accept_input
(
CharDriverState
*
s
);
int
qemu_chr_add_client
(
CharDriverState
*
s
,
int
fd
);
...
...
spice-qemu-char.c
浏览文件 @
fa5efccb
...
...
@@ -39,7 +39,7 @@ static int vmc_write(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len)
if
(
qemu_chr_can_read
(
scd
->
chr
)
<
last_out
)
{
break
;
}
qemu_chr_
read
(
scd
->
chr
,
p
,
last_out
);
qemu_chr_
be_write
(
scd
->
chr
,
p
,
last_out
);
out
+=
last_out
;
len
-=
last_out
;
p
+=
last_out
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录