Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
deb5db5e
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,发现更多精彩内容 >>
提交
deb5db5e
编写于
3月 09, 2007
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Export virConf symbols with leading __
上级
6a669418
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
55 addition
and
27 deletion
+55
-27
ChangeLog
ChangeLog
+7
-0
src/conf.c
src/conf.c
+20
-17
src/conf.h
src/conf.h
+17
-8
src/libvirt_sym.version
src/libvirt_sym.version
+11
-2
未找到文件。
ChangeLog
浏览文件 @
deb5db5e
Fri Mar 9 15:46:11 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/libvirt_sym.version, src/conf.h, src/conf.c: Export virConf*
symbols for private use by libvirt daemon. Prefixed symbols with
__ to indicate privateness, and not present in any installed header
files. Patch from Rich Jones.
Fri Mar 9 10:41:11 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* python/generator.py, python/libvir.c, python/libvirt_wrap.h,
...
...
src/conf.c
浏览文件 @
deb5db5e
...
...
@@ -146,7 +146,8 @@ virConfFreeValue(virConfValuePtr val)
free
(
val
);
}
virConfPtr
virConfNew
(
void
)
virConfPtr
__virConfNew
(
void
)
{
virConfPtr
ret
;
...
...
@@ -694,7 +695,7 @@ error:
************************************************************************/
/**
* virConfReadFile:
*
__
virConfReadFile:
* @filename: the path to the configuration file.
*
* Reads a configuration file.
...
...
@@ -703,7 +704,7 @@ error:
* read or parse the file, use virConfFree() to free the data.
*/
virConfPtr
virConfReadFile
(
const
char
*
filename
)
__
virConfReadFile
(
const
char
*
filename
)
{
char
content
[
4096
];
int
fd
;
...
...
@@ -728,7 +729,7 @@ virConfReadFile(const char *filename)
}
/**
* virConfReadMem:
*
__
virConfReadMem:
* @memory: pointer to the content of the configuration file
* @len: lenght in byte
*
...
...
@@ -739,7 +740,7 @@ virConfReadFile(const char *filename)
* parse the content, use virConfFree() to free the data.
*/
virConfPtr
virConfReadMem
(
const
char
*
memory
,
int
len
)
__
virConfReadMem
(
const
char
*
memory
,
int
len
)
{
if
((
memory
==
NULL
)
||
(
len
<
0
))
{
virConfError
(
NULL
,
VIR_ERR_INVALID_ARG
,
__FUNCTION__
,
0
);
...
...
@@ -752,7 +753,7 @@ virConfReadMem(const char *memory, int len)
}
/**
* virConfFree:
*
__
virConfFree:
* @conf: a configuration file handle
*
* Frees all data associated to the handle
...
...
@@ -760,7 +761,7 @@ virConfReadMem(const char *memory, int len)
* Returns 0 in case of success, -1 in case of error.
*/
int
virConfFree
(
virConfPtr
conf
)
__
virConfFree
(
virConfPtr
conf
)
{
virConfEntryPtr
tmp
;
if
(
conf
==
NULL
)
{
...
...
@@ -784,7 +785,7 @@ virConfFree(virConfPtr conf)
}
/**
* virConfGetValue:
*
__
virConfGetValue:
* @conf: a configuration file handle
* @entry: the name of the entry
*
...
...
@@ -794,7 +795,7 @@ virConfFree(virConfPtr conf)
* associated will be freed when virConfFree() is called
*/
virConfValuePtr
virConfGetValue
(
virConfPtr
conf
,
const
char
*
setting
)
__
virConfGetValue
(
virConfPtr
conf
,
const
char
*
setting
)
{
virConfEntryPtr
cur
;
...
...
@@ -808,7 +809,7 @@ virConfGetValue(virConfPtr conf, const char *setting)
}
/**
*
virConfG
etValue:
*
__virConfS
etValue:
* @conf: a configuration file handle
* @entry: the name of the entry
* @value: the new configuration value
...
...
@@ -820,9 +821,11 @@ virConfGetValue(virConfPtr conf, const char *setting)
*
* Returns 0 on success, or -1 on failure.
*/
int
virConfSetValue
(
virConfPtr
conf
,
const
char
*
setting
,
virConfValuePtr
value
)
{
int
__virConfSetValue
(
virConfPtr
conf
,
const
char
*
setting
,
virConfValuePtr
value
)
{
virConfEntryPtr
cur
,
prev
=
NULL
;
cur
=
conf
->
entries
;
...
...
@@ -864,7 +867,7 @@ int virConfSetValue (virConfPtr conf,
/**
* virConfWriteFile:
*
__
virConfWriteFile:
* @filename: the path to the configuration file.
* @conf: the conf
*
...
...
@@ -873,7 +876,7 @@ int virConfSetValue (virConfPtr conf,
* Returns the number of bytes written or -1 in case of error.
*/
int
virConfWriteFile
(
const
char
*
filename
,
virConfPtr
conf
)
__
virConfWriteFile
(
const
char
*
filename
,
virConfPtr
conf
)
{
virBufferPtr
buf
;
virConfEntryPtr
cur
;
...
...
@@ -913,7 +916,7 @@ error:
}
/**
* virConfWriteMem:
*
__
virConfWriteMem:
* @memory: pointer to the memory to store the config file
* @len: pointer to the lenght in byte of the store, on output the size
* @conf: the conf
...
...
@@ -926,7 +929,7 @@ error:
* Returns the number of bytes written or -1 in case of error.
*/
int
virConfWriteMem
(
char
*
memory
,
int
*
len
,
virConfPtr
conf
)
__
virConfWriteMem
(
char
*
memory
,
int
*
len
,
virConfPtr
conf
)
{
virBufferPtr
buf
;
virConfEntryPtr
cur
;
...
...
src/conf.h
浏览文件 @
deb5db5e
...
...
@@ -50,23 +50,32 @@ struct _virConfValue {
typedef
struct
_virConf
virConf
;
typedef
virConf
*
virConfPtr
;
virConfPtr
virConfNew
(
void
);
virConfPtr
virConfReadFile
(
const
char
*
filename
);
virConfPtr
virConfReadMem
(
const
char
*
memory
,
virConfPtr
__virConfNew
(
void
);
virConfPtr
__virConfReadFile
(
const
char
*
filename
);
virConfPtr
__
virConfReadMem
(
const
char
*
memory
,
int
len
);
int
virConfFree
(
virConfPtr
conf
);
int
__
virConfFree
(
virConfPtr
conf
);
virConfValuePtr
virConfGetValue
(
virConfPtr
conf
,
virConfValuePtr
__virConfGetValue
(
virConfPtr
conf
,
const
char
*
setting
);
int
virConfSetValue
(
virConfPtr
conf
,
int
__virConfSetValue
(
virConfPtr
conf
,
const
char
*
setting
,
virConfValuePtr
value
);
int
virConfWriteFile
(
const
char
*
filename
,
int
__
virConfWriteFile
(
const
char
*
filename
,
virConfPtr
conf
);
int
virConfWriteMem
(
char
*
memory
,
int
__virConfWriteMem
(
char
*
memory
,
int
*
len
,
virConfPtr
conf
);
#define virConfNew() (__virConfNew())
#define virConfReadFile(f) (__virConfReadFile((f)))
#define virConfReadMem(m,l) (__virConfReadMem((m),(l)))
#define virConfFree(c) (__virConfFree((c)))
#define virConfGetValue(c,s) (__virConfGetValue((c),(s)))
#define virConfSetValue(c,s,v) (__virConfSetValue((c),(s),(v)))
#define virConfWriteFile(f,c) (__virConfWriteFile((f),(c)))
#define virConfWriteMem(m,l,c) (__virConfWriteMem((m),(l),(c)))
#ifdef __cplusplus
}
#endif
...
...
src/libvirt_sym.version
浏览文件 @
deb5db5e
...
...
@@ -59,8 +59,8 @@
virDomainGetVcpus;
virDomainGetMaxVcpus;
virDomainAttachDevice;
virDomainDetachDevice;
virDomainAttachDevice;
virDomainDetachDevice;
virConnectNumOfNetworks;
virConnectListNetworks;
...
...
@@ -83,5 +83,14 @@
virNetworkGetAutostart;
virNetworkSetAutostart;
__virConfNew;
__virConfReadFile;
__virConfReadMem;
__virConfFree;
__virConfGetValue;
__virConfSetValue;
__virConfWriteFile;
__virConfWriteMem;
local: *;
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录