Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
909cda12
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
909cda12
编写于
8月 15, 2011
作者:
A
Anthony Liguori
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
char: rename qemu_chr_can_read() -> qemu_chr_be_can_read()
Signed-off-by:
N
Anthony Liguori
<
aliguori@us.ibm.com
>
上级
fa5efccb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
15 deletion
+15
-15
console.c
console.c
+1
-1
hw/baum.c
hw/baum.c
+2
-2
qemu-char.c
qemu-char.c
+10
-10
qemu-char.h
qemu-char.h
+1
-1
spice-qemu-char.c
spice-qemu-char.c
+1
-1
未找到文件。
console.c
浏览文件 @
909cda12
...
...
@@ -1123,7 +1123,7 @@ static void kbd_send_chars(void *opaque)
int
len
;
uint8_t
buf
[
16
];
len
=
qemu_chr_
can_read
(
s
->
chr
);
len
=
qemu_chr_
be_can_write
(
s
->
chr
);
if
(
len
>
s
->
out_fifo
.
count
)
len
=
s
->
out_fifo
.
count
;
if
(
len
>
0
)
{
...
...
hw/baum.c
浏览文件 @
909cda12
...
...
@@ -223,7 +223,7 @@ static void baum_accept_input(struct CharDriverState *chr)
if
(
!
baum
->
out_buf_used
)
return
;
room
=
qemu_chr_
can_read
(
chr
);
room
=
qemu_chr_
be_can_write
(
chr
);
if
(
!
room
)
return
;
if
(
room
>
baum
->
out_buf_used
)
...
...
@@ -250,7 +250,7 @@ static void baum_write_packet(BaumDriverState *baum, const uint8_t *buf, int len
while
(
len
--
)
if
((
*
cur
++
=
*
buf
++
)
==
ESC
)
*
cur
++
=
ESC
;
room
=
qemu_chr_
can_read
(
baum
->
chr
);
room
=
qemu_chr_
be_can_write
(
baum
->
chr
);
len
=
cur
-
io_buf
;
if
(
len
<=
room
)
{
/* Fits */
...
...
qemu-char.c
浏览文件 @
909cda12
...
...
@@ -151,7 +151,7 @@ int qemu_chr_ioctl(CharDriverState *s, int cmd, void *arg)
return
s
->
chr_ioctl
(
s
,
cmd
,
arg
);
}
int
qemu_chr_
can_read
(
CharDriverState
*
s
)
int
qemu_chr_
be_can_write
(
CharDriverState
*
s
)
{
if
(
!
s
->
chr_can_read
)
return
0
;
...
...
@@ -565,7 +565,7 @@ static int fd_chr_read_poll(void *opaque)
CharDriverState
*
chr
=
opaque
;
FDCharDriver
*
s
=
chr
->
opaque
;
s
->
max_size
=
qemu_chr_
can_read
(
chr
);
s
->
max_size
=
qemu_chr_
be_can_write
(
chr
);
return
s
->
max_size
;
}
...
...
@@ -699,7 +699,7 @@ static int stdio_read_poll(void *opaque)
CharDriverState
*
chr
=
opaque
;
/* try to flush the queue if needed */
if
(
term_fifo_size
!=
0
&&
qemu_chr_
can_read
(
chr
)
>
0
)
{
if
(
term_fifo_size
!=
0
&&
qemu_chr_
be_can_write
(
chr
)
>
0
)
{
qemu_chr_be_write
(
chr
,
term_fifo
,
1
);
term_fifo_size
=
0
;
}
...
...
@@ -724,7 +724,7 @@ static void stdio_read(void *opaque)
return
;
}
if
(
size
>
0
)
{
if
(
qemu_chr_
can_read
(
chr
)
>
0
)
{
if
(
qemu_chr_
be_can_write
(
chr
)
>
0
)
{
qemu_chr_be_write
(
chr
,
buf
,
1
);
}
else
if
(
term_fifo_size
==
0
)
{
term_fifo
[
term_fifo_size
++
]
=
buf
[
0
];
...
...
@@ -890,7 +890,7 @@ static int pty_chr_read_poll(void *opaque)
CharDriverState
*
chr
=
opaque
;
PtyCharDriver
*
s
=
chr
->
opaque
;
s
->
read_bytes
=
qemu_chr_
can_read
(
chr
);
s
->
read_bytes
=
qemu_chr_
be_can_write
(
chr
);
return
s
->
read_bytes
;
}
...
...
@@ -1602,7 +1602,7 @@ static int win_chr_read_poll(CharDriverState *chr)
{
WinCharState
*
s
=
chr
->
opaque
;
s
->
max_size
=
qemu_chr_
can_read
(
chr
);
s
->
max_size
=
qemu_chr_
be_can_write
(
chr
);
return
s
->
max_size
;
}
...
...
@@ -1840,7 +1840,7 @@ static int udp_chr_read_poll(void *opaque)
CharDriverState
*
chr
=
opaque
;
NetCharDriver
*
s
=
chr
->
opaque
;
s
->
max_size
=
qemu_chr_
can_read
(
chr
);
s
->
max_size
=
qemu_chr_
be_can_write
(
chr
);
/* If there were any stray characters in the queue process them
* first
...
...
@@ -1848,7 +1848,7 @@ static int udp_chr_read_poll(void *opaque)
while
(
s
->
max_size
>
0
&&
s
->
bufptr
<
s
->
bufcnt
)
{
qemu_chr_be_write
(
chr
,
&
s
->
buf
[
s
->
bufptr
],
1
);
s
->
bufptr
++
;
s
->
max_size
=
qemu_chr_
can_read
(
chr
);
s
->
max_size
=
qemu_chr_
be_can_write
(
chr
);
}
return
s
->
max_size
;
}
...
...
@@ -1869,7 +1869,7 @@ static void udp_chr_read(void *opaque)
while
(
s
->
max_size
>
0
&&
s
->
bufptr
<
s
->
bufcnt
)
{
qemu_chr_be_write
(
chr
,
&
s
->
buf
[
s
->
bufptr
],
1
);
s
->
bufptr
++
;
s
->
max_size
=
qemu_chr_
can_read
(
chr
);
s
->
max_size
=
qemu_chr_
be_can_write
(
chr
);
}
}
...
...
@@ -1963,7 +1963,7 @@ static int tcp_chr_read_poll(void *opaque)
TCPCharDriver
*
s
=
chr
->
opaque
;
if
(
!
s
->
connected
)
return
0
;
s
->
max_size
=
qemu_chr_
can_read
(
chr
);
s
->
max_size
=
qemu_chr_
be_can_write
(
chr
);
return
s
->
max_size
;
}
...
...
qemu-char.h
浏览文件 @
909cda12
...
...
@@ -96,7 +96,7 @@ void qemu_chr_add_handlers(CharDriverState *s,
void
*
opaque
);
int
qemu_chr_ioctl
(
CharDriverState
*
s
,
int
cmd
,
void
*
arg
);
void
qemu_chr_generic_open
(
CharDriverState
*
s
);
int
qemu_chr_
can_read
(
CharDriverState
*
s
);
int
qemu_chr_
be_can_write
(
CharDriverState
*
s
);
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
);
...
...
spice-qemu-char.c
浏览文件 @
909cda12
...
...
@@ -36,7 +36,7 @@ static int vmc_write(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len)
while
(
len
>
0
)
{
last_out
=
MIN
(
len
,
VMC_MAX_HOST_WRITE
);
if
(
qemu_chr_
can_read
(
scd
->
chr
)
<
last_out
)
{
if
(
qemu_chr_
be_can_write
(
scd
->
chr
)
<
last_out
)
{
break
;
}
qemu_chr_be_write
(
scd
->
chr
,
p
,
last_out
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录