Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
b31e4d00
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b31e4d00
编写于
2月 09, 2016
作者:
J
Ján Tomko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vbox: remove extra spaces from assignments
上级
ebe24c84
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
41 addition
and
41 deletion
+41
-41
src/vbox/vbox_common.c
src/vbox/vbox_common.c
+5
-5
src/vbox/vbox_tmpl.c
src/vbox/vbox_tmpl.c
+36
-36
未找到文件。
src/vbox/vbox_common.c
浏览文件 @
b31e4d00
...
...
@@ -227,7 +227,7 @@ static char *vboxGenerateMediumName(PRUint32 storageBus,
maxPortPerInst
=
aMaxPortPerInst
[
storageBus
];
maxSlotPerPort
=
aMaxSlotPerPort
[
storageBus
];
total
=
(
deviceInst
*
maxPortPerInst
*
maxSlotPerPort
)
total
=
(
deviceInst
*
maxPortPerInst
*
maxSlotPerPort
)
+
(
devicePort
*
maxSlotPerPort
)
+
deviceSlot
;
...
...
@@ -3071,7 +3071,7 @@ vboxHostDeviceGetXMLDesc(vboxGlobalData *data, virDomainDefPtr def, IMachine *ma
ignore_value
(
virStrToLong_ui
(
vendorIdUtf8
,
&
endptr
,
16
,
&
vendorId
));
ignore_value
(
virStrToLong_ui
(
productIdUtf8
,
&
endptr
,
16
,
&
productId
));
def
->
hostdevs
[
USBFilterCount
]
->
source
.
subsys
.
u
.
usb
.
vendor
=
vendorId
;
def
->
hostdevs
[
USBFilterCount
]
->
source
.
subsys
.
u
.
usb
.
vendor
=
vendorId
;
def
->
hostdevs
[
USBFilterCount
]
->
source
.
subsys
.
u
.
usb
.
product
=
productId
;
VBOX_UTF16_FREE
(
vendorIdUtf16
);
...
...
@@ -4996,7 +4996,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
goto
cleanup
;
}
gVBoxAPI
.
UIID
.
vboxIIDToUtf8
(
data
,
&
iid
,
&
uuid
);
disk
->
uuid
=
uuid
;
disk
->
uuid
=
uuid
;
vboxIIDUnalloc
(
&
iid
);
rc
=
gVBoxAPI
.
UIMedium
.
GetParent
(
medium
,
&
parentDisk
);
...
...
@@ -5115,7 +5115,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
IProgress
*
progress
=
NULL
;
PRUint32
tab
[
1
];
tab
[
0
]
=
MediumVariant_Diff
;
tab
[
0
]
=
MediumVariant_Diff
;
gVBoxAPI
.
UIMedium
.
CreateDiffStorage
(
medium
,
newMedium
,
1
,
tab
,
&
progress
);
gVBoxAPI
.
UIProgress
.
WaitForCompletion
(
progress
,
-
1
);
...
...
@@ -6878,7 +6878,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
VBOX_UTF16_FREE
(
newLocation
);
PRUint32
tab
[
1
];
tab
[
0
]
=
MediumVariant_Diff
;
tab
[
0
]
=
MediumVariant_Diff
;
gVBoxAPI
.
UIMedium
.
CreateDiffStorage
(
medium
,
newMedium
,
1
,
tab
,
&
progress
);
gVBoxAPI
.
UIProgress
.
WaitForCompletion
(
progress
,
-
1
);
...
...
src/vbox/vbox_tmpl.c
浏览文件 @
b31e4d00
...
...
@@ -228,18 +228,18 @@ static void nsIDtoChar(unsigned char *uuid, const nsID *iid)
memcpy
(
uuidinterim
,
iid
,
VIR_UUID_BUFLEN
);
virUUIDFormat
(
uuidinterim
,
uuidstrsrc
);
uuidstrdst
[
0
]
=
uuidstrsrc
[
6
];
uuidstrdst
[
1
]
=
uuidstrsrc
[
7
];
uuidstrdst
[
2
]
=
uuidstrsrc
[
4
];
uuidstrdst
[
3
]
=
uuidstrsrc
[
5
];
uuidstrdst
[
4
]
=
uuidstrsrc
[
2
];
uuidstrdst
[
5
]
=
uuidstrsrc
[
3
];
uuidstrdst
[
6
]
=
uuidstrsrc
[
0
];
uuidstrdst
[
7
]
=
uuidstrsrc
[
1
];
uuidstrdst
[
8
]
=
uuidstrsrc
[
8
];
uuidstrdst
[
9
]
=
uuidstrsrc
[
11
];
uuidstrdst
[
0
]
=
uuidstrsrc
[
6
];
uuidstrdst
[
1
]
=
uuidstrsrc
[
7
];
uuidstrdst
[
2
]
=
uuidstrsrc
[
4
];
uuidstrdst
[
3
]
=
uuidstrsrc
[
5
];
uuidstrdst
[
4
]
=
uuidstrsrc
[
2
];
uuidstrdst
[
5
]
=
uuidstrsrc
[
3
];
uuidstrdst
[
6
]
=
uuidstrsrc
[
0
];
uuidstrdst
[
7
]
=
uuidstrsrc
[
1
];
uuidstrdst
[
8
]
=
uuidstrsrc
[
8
];
uuidstrdst
[
9
]
=
uuidstrsrc
[
11
];
uuidstrdst
[
10
]
=
uuidstrsrc
[
12
];
uuidstrdst
[
11
]
=
uuidstrsrc
[
9
];
uuidstrdst
[
12
]
=
uuidstrsrc
[
10
];
...
...
@@ -267,18 +267,18 @@ static void nsIDFromChar(nsID *iid, const unsigned char *uuid)
virUUIDFormat
(
uuid
,
uuidstrsrc
);
uuidstrdst
[
0
]
=
uuidstrsrc
[
6
];
uuidstrdst
[
1
]
=
uuidstrsrc
[
7
];
uuidstrdst
[
2
]
=
uuidstrsrc
[
4
];
uuidstrdst
[
3
]
=
uuidstrsrc
[
5
];
uuidstrdst
[
4
]
=
uuidstrsrc
[
2
];
uuidstrdst
[
5
]
=
uuidstrsrc
[
3
];
uuidstrdst
[
6
]
=
uuidstrsrc
[
0
];
uuidstrdst
[
7
]
=
uuidstrsrc
[
1
];
uuidstrdst
[
0
]
=
uuidstrsrc
[
6
];
uuidstrdst
[
1
]
=
uuidstrsrc
[
7
];
uuidstrdst
[
2
]
=
uuidstrsrc
[
4
];
uuidstrdst
[
3
]
=
uuidstrsrc
[
5
];
uuidstrdst
[
4
]
=
uuidstrsrc
[
2
];
uuidstrdst
[
5
]
=
uuidstrsrc
[
3
];
uuidstrdst
[
6
]
=
uuidstrsrc
[
0
];
uuidstrdst
[
7
]
=
uuidstrsrc
[
1
];
uuidstrdst
[
8
]
=
uuidstrsrc
[
8
];
uuidstrdst
[
8
]
=
uuidstrsrc
[
8
];
uuidstrdst
[
9
]
=
uuidstrsrc
[
11
];
uuidstrdst
[
9
]
=
uuidstrsrc
[
11
];
uuidstrdst
[
10
]
=
uuidstrsrc
[
12
];
uuidstrdst
[
11
]
=
uuidstrsrc
[
9
];
uuidstrdst
[
12
]
=
uuidstrsrc
[
10
];
...
...
@@ -940,13 +940,13 @@ _vboxAttachDrivesOld(virDomainDefPtr def, vboxGlobalData *data, IMachine *machin
if
(
STREQ
(
def
->
disks
[
i
]
->
dst
,
"hda"
))
{
channel
=
0
;
device
=
0
;
device
=
0
;
}
else
if
(
STREQ
(
def
->
disks
[
i
]
->
dst
,
"hdb"
))
{
channel
=
0
;
device
=
1
;
device
=
1
;
}
else
if
(
STREQ
(
def
->
disks
[
i
]
->
dst
,
"hdd"
))
{
channel
=
1
;
device
=
1
;
device
=
1
;
}
rc
=
machine
->
vtbl
->
AttachHardDisk
(
machine
,
...
...
@@ -1425,31 +1425,31 @@ vboxCallbackOnMachineStateChange(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED,
virObjectEventPtr
ev
;
if
(
state
==
MachineState_Starting
)
{
event
=
VIR_DOMAIN_EVENT_STARTED
;
event
=
VIR_DOMAIN_EVENT_STARTED
;
detail
=
VIR_DOMAIN_EVENT_STARTED_BOOTED
;
}
else
if
(
state
==
MachineState_Restoring
)
{
event
=
VIR_DOMAIN_EVENT_STARTED
;
event
=
VIR_DOMAIN_EVENT_STARTED
;
detail
=
VIR_DOMAIN_EVENT_STARTED_RESTORED
;
}
else
if
(
state
==
MachineState_Paused
)
{
event
=
VIR_DOMAIN_EVENT_SUSPENDED
;
event
=
VIR_DOMAIN_EVENT_SUSPENDED
;
detail
=
VIR_DOMAIN_EVENT_SUSPENDED_PAUSED
;
}
else
if
(
state
==
MachineState_Running
)
{
event
=
VIR_DOMAIN_EVENT_RESUMED
;
event
=
VIR_DOMAIN_EVENT_RESUMED
;
detail
=
VIR_DOMAIN_EVENT_RESUMED_UNPAUSED
;
}
else
if
(
state
==
MachineState_PoweredOff
)
{
event
=
VIR_DOMAIN_EVENT_STOPPED
;
event
=
VIR_DOMAIN_EVENT_STOPPED
;
detail
=
VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN
;
}
else
if
(
state
==
MachineState_Stopping
)
{
event
=
VIR_DOMAIN_EVENT_STOPPED
;
event
=
VIR_DOMAIN_EVENT_STOPPED
;
detail
=
VIR_DOMAIN_EVENT_STOPPED_DESTROYED
;
}
else
if
(
state
==
MachineState_Aborted
)
{
event
=
VIR_DOMAIN_EVENT_STOPPED
;
event
=
VIR_DOMAIN_EVENT_STOPPED
;
detail
=
VIR_DOMAIN_EVENT_STOPPED_CRASHED
;
}
else
if
(
state
==
MachineState_Saving
)
{
event
=
VIR_DOMAIN_EVENT_STOPPED
;
event
=
VIR_DOMAIN_EVENT_STOPPED
;
detail
=
VIR_DOMAIN_EVENT_STOPPED_SAVED
;
}
else
{
event
=
VIR_DOMAIN_EVENT_STOPPED
;
event
=
VIR_DOMAIN_EVENT_STOPPED
;
detail
=
VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN
;
}
...
...
@@ -1550,10 +1550,10 @@ vboxCallbackOnMachineRegistered(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED,
* to show the VIR_DOMAIN_EVENT_UNDEFINED event
*/
if
(
registered
)
{
event
=
VIR_DOMAIN_EVENT_DEFINED
;
event
=
VIR_DOMAIN_EVENT_DEFINED
;
detail
=
VIR_DOMAIN_EVENT_DEFINED_ADDED
;
}
else
{
event
=
VIR_DOMAIN_EVENT_UNDEFINED
;
event
=
VIR_DOMAIN_EVENT_UNDEFINED
;
detail
=
VIR_DOMAIN_EVENT_UNDEFINED_REMOVED
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录