Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
49a1c160
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看板
提交
49a1c160
编写于
9月 20, 2012
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Convert HAVE_YAJL into WITH_YAJL
Signed-off-by:
N
Daniel P. Berrange
<
berrange@redhat.com
>
上级
cd699ed1
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
15 addition
and
15 deletion
+15
-15
configure.ac
configure.ac
+3
-3
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.c
+1
-1
src/qemu/qemu_driver.c
src/qemu/qemu_driver.c
+2
-2
src/util/virjson.c
src/util/virjson.c
+7
-7
tests/Makefile.am
tests/Makefile.am
+1
-1
tests/qemuhelptest.c
tests/qemuhelptest.c
+1
-1
未找到文件。
configure.ac
浏览文件 @
49a1c160
...
...
@@ -1206,15 +1206,15 @@ if test "x$with_yajl" != "xno"; then
CPPFLAGS="$old_cppflags"
LIBS="$old_libs"
if test "x$with_yajl" = "xyes" ; then
AC_DEFINE_UNQUOTED([
HAVE
_YAJL], 1,
AC_DEFINE_UNQUOTED([
WITH
_YAJL], 1,
[whether YAJL is available for JSON parsing/formatting])
fi
if test "x$with_yajl2" = "xyes" ; then
AC_DEFINE_UNQUOTED([
HAVE
_YAJL2], 1,
AC_DEFINE_UNQUOTED([
WITH
_YAJL2], 1,
[whether YAJL has API version 2])
fi
fi
AM_CONDITIONAL([
HAVE
_YAJL], [test "x$with_yajl" = "xyes"])
AM_CONDITIONAL([
WITH
_YAJL], [test "x$with_yajl" = "xyes"])
AC_SUBST([YAJL_CFLAGS])
AC_SUBST([YAJL_LIBS])
...
...
src/qemu/qemu_capabilities.c
浏览文件 @
49a1c160
...
...
@@ -1144,7 +1144,7 @@ qemuCapsComputeCmdFlags(const char *help,
* backported for libvirt. The benefits of JSON mode now
* outweigh the downside.
*/
#if
HAVE
_YAJL
#if
WITH
_YAJL
if
(
version
>=
13000
)
{
qemuCapsSet
(
caps
,
QEMU_CAPS_MONITOR_JSON
);
}
else
if
(
version
>=
12000
&&
...
...
src/qemu/qemu_driver.c
浏览文件 @
49a1c160
...
...
@@ -1991,7 +1991,7 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags)
goto
cleanup
;
}
}
else
{
#if
HAVE
_YAJL
#if
WITH
_YAJL
if
(
qemuCapsGet
(
priv
->
caps
,
QEMU_CAPS_MONITOR_JSON
))
{
if
(
!
qemuCapsGet
(
priv
->
caps
,
QEMU_CAPS_NO_SHUTDOWN
))
{
virReportError
(
VIR_ERR_CONFIG_UNSUPPORTED
,
"%s"
,
...
...
@@ -2003,7 +2003,7 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags)
virReportError
(
VIR_ERR_OPERATION_INVALID
,
"%s"
,
_
(
"Reboot is not supported without the JSON monitor"
));
goto
cleanup
;
#if
HAVE
_YAJL
#if
WITH
_YAJL
}
#endif
}
...
...
src/util/virjson.c
浏览文件 @
49a1c160
...
...
@@ -29,11 +29,11 @@
#include "virlog.h"
#include "virutil.h"
#if
HAVE
_YAJL
#if
WITH
_YAJL
# include <yajl/yajl_gen.h>
# include <yajl/yajl_parse.h>
# ifdef
HAVE
_YAJL2
# ifdef
WITH
_YAJL2
# define yajl_size_t size_t
# else
# define yajl_size_t unsigned int
...
...
@@ -659,7 +659,7 @@ int virJSONValueObjectIsNull(virJSONValuePtr object, const char *key)
}
#if
HAVE
_YAJL
#if
WITH
_YAJL
static
int
virJSONParserInsertValue
(
virJSONParserPtr
parser
,
virJSONValuePtr
value
)
{
...
...
@@ -937,13 +937,13 @@ virJSONValuePtr virJSONValueFromString(const char *jsonstring)
yajl_handle
hand
;
virJSONParser
parser
=
{
NULL
,
NULL
,
0
};
virJSONValuePtr
ret
=
NULL
;
# ifndef
HAVE
_YAJL2
# ifndef
WITH
_YAJL2
yajl_parser_config
cfg
=
{
1
,
1
};
# endif
VIR_DEBUG
(
"string=%s"
,
jsonstring
);
# ifdef
HAVE
_YAJL2
# ifdef
WITH
_YAJL2
hand
=
yajl_alloc
(
&
parserCallbacks
,
NULL
,
&
parser
);
if
(
hand
)
{
yajl_config
(
hand
,
yajl_allow_comments
,
1
);
...
...
@@ -1061,13 +1061,13 @@ char *virJSONValueToString(virJSONValuePtr object,
const
unsigned
char
*
str
;
char
*
ret
=
NULL
;
yajl_size_t
len
;
# ifndef
HAVE
_YAJL2
# ifndef
WITH
_YAJL2
yajl_gen_config
conf
=
{
pretty
?
1
:
0
,
pretty
?
" "
:
" "
};
# endif
VIR_DEBUG
(
"object=%p"
,
object
);
# ifdef
HAVE
_YAJL2
# ifdef
WITH
_YAJL2
g
=
yajl_gen_alloc
(
NULL
);
if
(
g
)
{
yajl_gen_config
(
g
,
yajl_gen_beautify
,
pretty
?
1
:
0
);
...
...
tests/Makefile.am
浏览文件 @
49a1c160
...
...
@@ -146,7 +146,7 @@ if WITH_CIL
test_programs
+=
object-locking
endif
if
HAVE
_YAJL
if
WITH
_YAJL
test_programs
+=
jsontest
endif
...
...
tests/qemuhelptest.c
浏览文件 @
49a1c160
...
...
@@ -56,7 +56,7 @@ static int testHelpStrParsing(const void *data)
&
version
,
&
is_kvm
,
&
kvm_version
,
false
)
==
-
1
)
goto
cleanup
;
# ifndef
HAVE
_YAJL
# ifndef
WITH
_YAJL
if
(
qemuCapsGet
(
info
->
flags
,
QEMU_CAPS_MONITOR_JSON
))
qemuCapsSet
(
flags
,
QEMU_CAPS_MONITOR_JSON
);
# endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录