Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
c7ba56c4
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看板
提交
c7ba56c4
编写于
7月 15, 2010
作者:
A
Anthony Liguori
浏览文件
操作
浏览文件
下载
差异文件
Merge remote branch 'kwolf/for-anthony' into staging
上级
79368c81
98f28ad7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
23 addition
and
5 deletion
+23
-5
block-migration.c
block-migration.c
+1
-1
hw/ide/core.c
hw/ide/core.c
+4
-0
hw/scsi-disk.c
hw/scsi-disk.c
+5
-0
hw/virtio-blk.c
hw/virtio-blk.c
+10
-0
hw/virtio-pci.c
hw/virtio-pci.c
+2
-3
qemu-img-cmds.hx
qemu-img-cmds.hx
+1
-1
未找到文件。
block-migration.c
浏览文件 @
c7ba56c4
...
...
@@ -238,7 +238,7 @@ static void init_blk_migration_it(void *opaque, BlockDriverState *bs)
if
(
!
bdrv_is_read_only
(
bs
))
{
sectors
=
bdrv_getlength
(
bs
)
>>
BDRV_SECTOR_BITS
;
if
(
sectors
=
=
0
)
{
if
(
sectors
<
=
0
)
{
return
;
}
...
...
hw/ide/core.c
浏览文件 @
c7ba56c4
...
...
@@ -2630,6 +2630,10 @@ int ide_init_drive(IDEState *s, BlockDriverState *bs,
s
->
drive_kind
=
IDE_CD
;
bdrv_set_change_cb
(
bs
,
cdrom_change_cb
,
s
);
}
else
{
if
(
!
bdrv_is_inserted
(
s
->
bs
))
{
error_report
(
"Device needs media, but drive is empty"
);
return
-
1
;
}
if
(
bdrv_is_read_only
(
bs
))
{
error_report
(
"Can't use a read-only drive"
);
return
-
1
;
...
...
hw/scsi-disk.c
浏览文件 @
c7ba56c4
...
...
@@ -1059,6 +1059,11 @@ static int scsi_disk_initfn(SCSIDevice *dev)
s
->
bs
=
s
->
qdev
.
conf
.
bs
;
is_cd
=
bdrv_get_type_hint
(
s
->
bs
)
==
BDRV_TYPE_CDROM
;
if
(
!
is_cd
&&
!
bdrv_is_inserted
(
s
->
bs
))
{
error_report
(
"Device needs media, but drive is empty"
);
return
-
1
;
}
if
(
bdrv_get_on_error
(
s
->
bs
,
1
)
!=
BLOCK_ERR_REPORT
)
{
error_report
(
"Device doesn't support drive option rerror"
);
return
-
1
;
...
...
hw/virtio-blk.c
浏览文件 @
c7ba56c4
...
...
@@ -12,6 +12,7 @@
*/
#include <qemu-common.h>
#include "qemu-error.h"
#include "virtio-blk.h"
#ifdef __linux__
# include <scsi/sg.h>
...
...
@@ -490,6 +491,15 @@ VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *conf)
static
int
virtio_blk_id
;
DriveInfo
*
dinfo
;
if
(
!
conf
->
bs
)
{
error_report
(
"virtio-blk-pci: drive property not set"
);
return
NULL
;
}
if
(
!
bdrv_is_inserted
(
conf
->
bs
))
{
error_report
(
"Device needs media, but drive is empty"
);
return
NULL
;
}
s
=
(
VirtIOBlock
*
)
virtio_common_init
(
"virtio-blk"
,
VIRTIO_ID_BLOCK
,
sizeof
(
struct
virtio_blk_config
),
sizeof
(
VirtIOBlock
));
...
...
hw/virtio-pci.c
浏览文件 @
c7ba56c4
...
...
@@ -546,11 +546,10 @@ static int virtio_blk_init_pci(PCIDevice *pci_dev)
proxy
->
class_code
!=
PCI_CLASS_STORAGE_OTHER
)
proxy
->
class_code
=
PCI_CLASS_STORAGE_SCSI
;
if
(
!
proxy
->
block
.
bs
)
{
error_report
(
"virtio-blk-pci: drive property not set"
);
vdev
=
virtio_blk_init
(
&
pci_dev
->
qdev
,
&
proxy
->
block
);
if
(
!
vdev
)
{
return
-
1
;
}
vdev
=
virtio_blk_init
(
&
pci_dev
->
qdev
,
&
proxy
->
block
);
vdev
->
nvectors
=
proxy
->
nvectors
;
virtio_init_pci
(
proxy
,
vdev
,
PCI_VENDOR_ID_REDHAT_QUMRANET
,
...
...
qemu-img-cmds.hx
浏览文件 @
c7ba56c4
...
...
@@ -54,6 +54,6 @@ ETEXI
DEF
(
"resize"
,
img_resize
,
"resize filename [+ | -]size"
)
STEXI
@item
re
bas
e
@var
{
filename
}
[
+
|
-
]
@var
{
size
}
@item
re
siz
e
@var
{
filename
}
[
+
|
-
]
@var
{
size
}
@end
table
ETEXI
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录