Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
45ca0b87
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,发现更多精彩内容 >>
提交
45ca0b87
编写于
5月 21, 2013
作者:
O
Osier Yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
src/locking: Remove the whitespace before ";"
上级
ea4e5540
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
14 addition
and
14 deletion
+14
-14
src/locking/domain_lock.c
src/locking/domain_lock.c
+2
-2
src/locking/lock_daemon.c
src/locking/lock_daemon.c
+2
-2
src/locking/lock_driver_lockd.c
src/locking/lock_driver_lockd.c
+6
-6
src/locking/lock_driver_sanlock.c
src/locking/lock_driver_sanlock.c
+3
-3
src/locking/lock_manager.c
src/locking/lock_manager.c
+1
-1
未找到文件。
src/locking/domain_lock.c
浏览文件 @
45ca0b87
...
@@ -138,12 +138,12 @@ static virLockManagerPtr virDomainLockManagerNew(virLockManagerPluginPtr plugin,
...
@@ -138,12 +138,12 @@ static virLockManagerPtr virDomainLockManagerNew(virLockManagerPluginPtr plugin,
if
(
withResources
)
{
if
(
withResources
)
{
VIR_DEBUG
(
"Adding leases"
);
VIR_DEBUG
(
"Adding leases"
);
for
(
i
=
0
;
i
<
dom
->
def
->
nleases
;
i
++
)
for
(
i
=
0
;
i
<
dom
->
def
->
nleases
;
i
++
)
if
(
virDomainLockManagerAddLease
(
lock
,
dom
->
def
->
leases
[
i
])
<
0
)
if
(
virDomainLockManagerAddLease
(
lock
,
dom
->
def
->
leases
[
i
])
<
0
)
goto
error
;
goto
error
;
VIR_DEBUG
(
"Adding disks"
);
VIR_DEBUG
(
"Adding disks"
);
for
(
i
=
0
;
i
<
dom
->
def
->
ndisks
;
i
++
)
for
(
i
=
0
;
i
<
dom
->
def
->
ndisks
;
i
++
)
if
(
virDomainLockManagerAddDisk
(
lock
,
dom
->
def
->
disks
[
i
])
<
0
)
if
(
virDomainLockManagerAddDisk
(
lock
,
dom
->
def
->
disks
[
i
])
<
0
)
goto
error
;
goto
error
;
}
}
...
...
src/locking/lock_daemon.c
浏览文件 @
45ca0b87
...
@@ -215,7 +215,7 @@ virLockDaemonNewPostExecRestart(virJSONValuePtr object, bool privileged)
...
@@ -215,7 +215,7 @@ virLockDaemonNewPostExecRestart(virJSONValuePtr object, bool privileged)
goto
error
;
goto
error
;
}
}
for
(
i
=
0
;
i
<
n
;
i
++
)
{
for
(
i
=
0
;
i
<
n
;
i
++
)
{
virLockSpacePtr
lockspace
;
virLockSpacePtr
lockspace
;
child
=
virJSONValueArrayGet
(
lockspaces
,
i
);
child
=
virJSONValueArrayGet
(
lockspaces
,
i
);
...
@@ -749,7 +749,7 @@ virLockDaemonClientFree(void *opaque)
...
@@ -749,7 +749,7 @@ virLockDaemonClientFree(void *opaque)
* closed the connection, we must kill it off
* closed the connection, we must kill it off
* to make sure it doesn't do nasty stuff */
* to make sure it doesn't do nasty stuff */
if
(
data
.
gotError
||
data
.
hadSomeLeases
)
{
if
(
data
.
gotError
||
data
.
hadSomeLeases
)
{
for
(
i
=
0
;
i
<
15
;
i
++
)
{
for
(
i
=
0
;
i
<
15
;
i
++
)
{
int
signum
;
int
signum
;
if
(
i
==
0
)
if
(
i
==
0
)
signum
=
SIGTERM
;
signum
=
SIGTERM
;
...
...
src/locking/lock_driver_lockd.c
浏览文件 @
45ca0b87
...
@@ -428,7 +428,7 @@ static void virLockManagerLockDaemonFree(virLockManagerPtr lock)
...
@@ -428,7 +428,7 @@ static void virLockManagerLockDaemonFree(virLockManagerPtr lock)
lock
->
privateData
=
NULL
;
lock
->
privateData
=
NULL
;
for
(
i
=
0
;
i
<
priv
->
nresources
;
i
++
)
{
for
(
i
=
0
;
i
<
priv
->
nresources
;
i
++
)
{
VIR_FREE
(
priv
->
resources
[
i
].
lockspace
);
VIR_FREE
(
priv
->
resources
[
i
].
lockspace
);
VIR_FREE
(
priv
->
resources
[
i
].
name
);
VIR_FREE
(
priv
->
resources
[
i
].
name
);
}
}
...
@@ -459,7 +459,7 @@ static int virLockManagerLockDaemonNew(virLockManagerPtr lock,
...
@@ -459,7 +459,7 @@ static int virLockManagerLockDaemonNew(virLockManagerPtr lock,
switch
(
type
)
{
switch
(
type
)
{
case
VIR_LOCK_MANAGER_OBJECT_TYPE_DOMAIN
:
case
VIR_LOCK_MANAGER_OBJECT_TYPE_DOMAIN
:
for
(
i
=
0
;
i
<
nparams
;
i
++
)
{
for
(
i
=
0
;
i
<
nparams
;
i
++
)
{
if
(
STREQ
(
params
[
i
].
key
,
"uuid"
))
{
if
(
STREQ
(
params
[
i
].
key
,
"uuid"
))
{
memcpy
(
priv
->
uuid
,
params
[
i
].
value
.
uuid
,
VIR_UUID_BUFLEN
);
memcpy
(
priv
->
uuid
,
params
[
i
].
value
.
uuid
,
VIR_UUID_BUFLEN
);
}
else
if
(
STREQ
(
params
[
i
].
key
,
"name"
))
{
}
else
if
(
STREQ
(
params
[
i
].
key
,
"name"
))
{
...
@@ -530,7 +530,7 @@ static char *virLockManagerLockDaemonDiskLeaseName(const char *path)
...
@@ -530,7 +530,7 @@ static char *virLockManagerLockDaemonDiskLeaseName(const char *path)
return
NULL
;
return
NULL
;
}
}
for
(
i
=
0
;
i
<
SHA256_DIGEST_SIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
SHA256_DIGEST_SIZE
;
i
++
)
{
ret
[
i
*
2
]
=
hex
[(
buf
[
i
]
>>
4
)
&
0xf
];
ret
[
i
*
2
]
=
hex
[(
buf
[
i
]
>>
4
)
&
0xf
];
ret
[(
i
*
2
)
+
1
]
=
hex
[
buf
[
i
]
&
0xf
];
ret
[(
i
*
2
)
+
1
]
=
hex
[
buf
[
i
]
&
0xf
];
}
}
...
@@ -629,7 +629,7 @@ static int virLockManagerLockDaemonAddResource(virLockManagerPtr lock,
...
@@ -629,7 +629,7 @@ static int virLockManagerLockDaemonAddResource(virLockManagerPtr lock,
size_t
i
;
size_t
i
;
char
*
path
=
NULL
;
char
*
path
=
NULL
;
char
*
lockspace
=
NULL
;
char
*
lockspace
=
NULL
;
for
(
i
=
0
;
i
<
nparams
;
i
++
)
{
for
(
i
=
0
;
i
<
nparams
;
i
++
)
{
if
(
STREQ
(
params
[
i
].
key
,
"offset"
))
{
if
(
STREQ
(
params
[
i
].
key
,
"offset"
))
{
if
(
params
[
i
].
value
.
ul
!=
0
)
{
if
(
params
[
i
].
value
.
ul
!=
0
)
{
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
...
@@ -725,7 +725,7 @@ static int virLockManagerLockDaemonAcquire(virLockManagerPtr lock,
...
@@ -725,7 +725,7 @@ static int virLockManagerLockDaemonAcquire(virLockManagerPtr lock,
if
(
!
(
flags
&
VIR_LOCK_MANAGER_ACQUIRE_REGISTER_ONLY
))
{
if
(
!
(
flags
&
VIR_LOCK_MANAGER_ACQUIRE_REGISTER_ONLY
))
{
size_t
i
;
size_t
i
;
for
(
i
=
0
;
i
<
priv
->
nresources
;
i
++
)
{
for
(
i
=
0
;
i
<
priv
->
nresources
;
i
++
)
{
virLockSpaceProtocolAcquireResourceArgs
args
;
virLockSpaceProtocolAcquireResourceArgs
args
;
memset
(
&
args
,
0
,
sizeof
(
args
));
memset
(
&
args
,
0
,
sizeof
(
args
));
...
@@ -781,7 +781,7 @@ static int virLockManagerLockDaemonRelease(virLockManagerPtr lock,
...
@@ -781,7 +781,7 @@ static int virLockManagerLockDaemonRelease(virLockManagerPtr lock,
if
(
!
(
client
=
virLockManagerLockDaemonConnect
(
lock
,
&
program
,
&
counter
)))
if
(
!
(
client
=
virLockManagerLockDaemonConnect
(
lock
,
&
program
,
&
counter
)))
goto
cleanup
;
goto
cleanup
;
for
(
i
=
0
;
i
<
priv
->
nresources
;
i
++
)
{
for
(
i
=
0
;
i
<
priv
->
nresources
;
i
++
)
{
virLockSpaceProtocolReleaseResourceArgs
args
;
virLockSpaceProtocolReleaseResourceArgs
args
;
memset
(
&
args
,
0
,
sizeof
(
args
));
memset
(
&
args
,
0
,
sizeof
(
args
));
...
...
src/locking/lock_driver_sanlock.c
浏览文件 @
45ca0b87
...
@@ -540,7 +540,7 @@ static int virLockManagerSanlockDiskLeaseName(const char *path,
...
@@ -540,7 +540,7 @@ static int virLockManagerSanlockDiskLeaseName(const char *path,
return
-
1
;
return
-
1
;
}
}
for
(
i
=
0
;
i
<
MD5_DIGEST_SIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
MD5_DIGEST_SIZE
;
i
++
)
{
str
[
i
*
2
]
=
hex
[(
buf
[
i
]
>>
4
)
&
0xf
];
str
[
i
*
2
]
=
hex
[(
buf
[
i
]
>>
4
)
&
0xf
];
str
[(
i
*
2
)
+
1
]
=
hex
[
buf
[
i
]
&
0xf
];
str
[(
i
*
2
)
+
1
]
=
hex
[
buf
[
i
]
&
0xf
];
}
}
...
@@ -1020,7 +1020,7 @@ static int virLockManagerSanlockAcquire(virLockManagerPtr lock,
...
@@ -1020,7 +1020,7 @@ static int virLockManagerSanlockAcquire(virLockManagerPtr lock,
VIR_DEBUG
(
"Acquire completed fd=%d"
,
sock
);
VIR_DEBUG
(
"Acquire completed fd=%d"
,
sock
);
if
(
res_free
)
{
if
(
res_free
)
{
for
(
i
=
0
;
i
<
res_count
;
i
++
)
{
for
(
i
=
0
;
i
<
res_count
;
i
++
)
{
VIR_FREE
(
res_args
[
i
]);
VIR_FREE
(
res_args
[
i
]);
}
}
VIR_FREE
(
res_args
);
VIR_FREE
(
res_args
);
...
@@ -1033,7 +1033,7 @@ static int virLockManagerSanlockAcquire(virLockManagerPtr lock,
...
@@ -1033,7 +1033,7 @@ static int virLockManagerSanlockAcquire(virLockManagerPtr lock,
error:
error:
if
(
res_free
)
{
if
(
res_free
)
{
for
(
i
=
0
;
i
<
res_count
;
i
++
)
{
for
(
i
=
0
;
i
<
res_count
;
i
++
)
{
VIR_FREE
(
res_args
[
i
]);
VIR_FREE
(
res_args
[
i
]);
}
}
VIR_FREE
(
res_args
);
VIR_FREE
(
res_args
);
...
...
src/locking/lock_manager.c
浏览文件 @
45ca0b87
...
@@ -79,7 +79,7 @@ static void virLockManagerLogParams(size_t nparams,
...
@@ -79,7 +79,7 @@ static void virLockManagerLogParams(size_t nparams,
{
{
int
i
;
int
i
;
char
uuidstr
[
VIR_UUID_STRING_BUFLEN
];
char
uuidstr
[
VIR_UUID_STRING_BUFLEN
];
for
(
i
=
0
;
i
<
nparams
;
i
++
)
{
for
(
i
=
0
;
i
<
nparams
;
i
++
)
{
switch
(
params
[
i
].
type
)
{
switch
(
params
[
i
].
type
)
{
case
VIR_LOCK_MANAGER_PARAM_TYPE_INT
:
case
VIR_LOCK_MANAGER_PARAM_TYPE_INT
:
VIR_DEBUG
(
" key=%s type=int value=%d"
,
params
[
i
].
key
,
params
[
i
].
value
.
i
);
VIR_DEBUG
(
" key=%s type=int value=%d"
,
params
[
i
].
key
,
params
[
i
].
value
.
i
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录