mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
Export virConf symbols with leading __
This commit is contained in:
parent
6a66941843
commit
deb5db5e1b
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
Fri Mar 9 10:41:11 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* python/generator.py, python/libvir.c, python/libvirt_wrap.h,
|
* python/generator.py, python/libvir.c, python/libvirt_wrap.h,
|
||||||
|
37
src/conf.c
37
src/conf.c
@ -146,7 +146,8 @@ virConfFreeValue(virConfValuePtr val)
|
|||||||
free(val);
|
free(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
virConfPtr virConfNew(void)
|
virConfPtr
|
||||||
|
__virConfNew(void)
|
||||||
{
|
{
|
||||||
virConfPtr ret;
|
virConfPtr ret;
|
||||||
|
|
||||||
@ -694,7 +695,7 @@ error:
|
|||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virConfReadFile:
|
* __virConfReadFile:
|
||||||
* @filename: the path to the configuration file.
|
* @filename: the path to the configuration file.
|
||||||
*
|
*
|
||||||
* Reads a configuration file.
|
* Reads a configuration file.
|
||||||
@ -703,7 +704,7 @@ error:
|
|||||||
* read or parse the file, use virConfFree() to free the data.
|
* read or parse the file, use virConfFree() to free the data.
|
||||||
*/
|
*/
|
||||||
virConfPtr
|
virConfPtr
|
||||||
virConfReadFile(const char *filename)
|
__virConfReadFile(const char *filename)
|
||||||
{
|
{
|
||||||
char content[4096];
|
char content[4096];
|
||||||
int fd;
|
int fd;
|
||||||
@ -728,7 +729,7 @@ virConfReadFile(const char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virConfReadMem:
|
* __virConfReadMem:
|
||||||
* @memory: pointer to the content of the configuration file
|
* @memory: pointer to the content of the configuration file
|
||||||
* @len: lenght in byte
|
* @len: lenght in byte
|
||||||
*
|
*
|
||||||
@ -739,7 +740,7 @@ virConfReadFile(const char *filename)
|
|||||||
* parse the content, use virConfFree() to free the data.
|
* parse the content, use virConfFree() to free the data.
|
||||||
*/
|
*/
|
||||||
virConfPtr
|
virConfPtr
|
||||||
virConfReadMem(const char *memory, int len)
|
__virConfReadMem(const char *memory, int len)
|
||||||
{
|
{
|
||||||
if ((memory == NULL) || (len < 0)) {
|
if ((memory == NULL) || (len < 0)) {
|
||||||
virConfError(NULL, VIR_ERR_INVALID_ARG, __FUNCTION__, 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
|
* @conf: a configuration file handle
|
||||||
*
|
*
|
||||||
* Frees all data associated to the 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.
|
* Returns 0 in case of success, -1 in case of error.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
virConfFree(virConfPtr conf)
|
__virConfFree(virConfPtr conf)
|
||||||
{
|
{
|
||||||
virConfEntryPtr tmp;
|
virConfEntryPtr tmp;
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
@ -784,7 +785,7 @@ virConfFree(virConfPtr conf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virConfGetValue:
|
* __virConfGetValue:
|
||||||
* @conf: a configuration file handle
|
* @conf: a configuration file handle
|
||||||
* @entry: the name of the entry
|
* @entry: the name of the entry
|
||||||
*
|
*
|
||||||
@ -794,7 +795,7 @@ virConfFree(virConfPtr conf)
|
|||||||
* associated will be freed when virConfFree() is called
|
* associated will be freed when virConfFree() is called
|
||||||
*/
|
*/
|
||||||
virConfValuePtr
|
virConfValuePtr
|
||||||
virConfGetValue(virConfPtr conf, const char *setting)
|
__virConfGetValue(virConfPtr conf, const char *setting)
|
||||||
{
|
{
|
||||||
virConfEntryPtr cur;
|
virConfEntryPtr cur;
|
||||||
|
|
||||||
@ -808,7 +809,7 @@ virConfGetValue(virConfPtr conf, const char *setting)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virConfGetValue:
|
* __virConfSetValue:
|
||||||
* @conf: a configuration file handle
|
* @conf: a configuration file handle
|
||||||
* @entry: the name of the entry
|
* @entry: the name of the entry
|
||||||
* @value: the new configuration value
|
* @value: the new configuration value
|
||||||
@ -820,9 +821,11 @@ virConfGetValue(virConfPtr conf, const char *setting)
|
|||||||
*
|
*
|
||||||
* Returns 0 on success, or -1 on failure.
|
* Returns 0 on success, or -1 on failure.
|
||||||
*/
|
*/
|
||||||
int virConfSetValue (virConfPtr conf,
|
int
|
||||||
const char *setting,
|
__virConfSetValue (virConfPtr conf,
|
||||||
virConfValuePtr value) {
|
const char *setting,
|
||||||
|
virConfValuePtr value)
|
||||||
|
{
|
||||||
virConfEntryPtr cur, prev = NULL;
|
virConfEntryPtr cur, prev = NULL;
|
||||||
|
|
||||||
cur = conf->entries;
|
cur = conf->entries;
|
||||||
@ -864,7 +867,7 @@ int virConfSetValue (virConfPtr conf,
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virConfWriteFile:
|
* __virConfWriteFile:
|
||||||
* @filename: the path to the configuration file.
|
* @filename: the path to the configuration file.
|
||||||
* @conf: the conf
|
* @conf: the conf
|
||||||
*
|
*
|
||||||
@ -873,7 +876,7 @@ int virConfSetValue (virConfPtr conf,
|
|||||||
* Returns the number of bytes written or -1 in case of error.
|
* Returns the number of bytes written or -1 in case of error.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
virConfWriteFile(const char *filename, virConfPtr conf)
|
__virConfWriteFile(const char *filename, virConfPtr conf)
|
||||||
{
|
{
|
||||||
virBufferPtr buf;
|
virBufferPtr buf;
|
||||||
virConfEntryPtr cur;
|
virConfEntryPtr cur;
|
||||||
@ -913,7 +916,7 @@ error:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virConfWriteMem:
|
* __virConfWriteMem:
|
||||||
* @memory: pointer to the memory to store the config file
|
* @memory: pointer to the memory to store the config file
|
||||||
* @len: pointer to the lenght in byte of the store, on output the size
|
* @len: pointer to the lenght in byte of the store, on output the size
|
||||||
* @conf: the conf
|
* @conf: the conf
|
||||||
@ -926,7 +929,7 @@ error:
|
|||||||
* Returns the number of bytes written or -1 in case of error.
|
* Returns the number of bytes written or -1 in case of error.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
virConfWriteMem(char *memory, int *len, virConfPtr conf)
|
__virConfWriteMem(char *memory, int *len, virConfPtr conf)
|
||||||
{
|
{
|
||||||
virBufferPtr buf;
|
virBufferPtr buf;
|
||||||
virConfEntryPtr cur;
|
virConfEntryPtr cur;
|
||||||
|
25
src/conf.h
25
src/conf.h
@ -50,23 +50,32 @@ struct _virConfValue {
|
|||||||
typedef struct _virConf virConf;
|
typedef struct _virConf virConf;
|
||||||
typedef virConf *virConfPtr;
|
typedef virConf *virConfPtr;
|
||||||
|
|
||||||
virConfPtr virConfNew (void);
|
virConfPtr __virConfNew (void);
|
||||||
virConfPtr virConfReadFile (const char *filename);
|
virConfPtr __virConfReadFile (const char *filename);
|
||||||
virConfPtr virConfReadMem (const char *memory,
|
virConfPtr __virConfReadMem (const char *memory,
|
||||||
int len);
|
int len);
|
||||||
int virConfFree (virConfPtr conf);
|
int __virConfFree (virConfPtr conf);
|
||||||
|
|
||||||
virConfValuePtr virConfGetValue (virConfPtr conf,
|
virConfValuePtr __virConfGetValue (virConfPtr conf,
|
||||||
const char *setting);
|
const char *setting);
|
||||||
int virConfSetValue (virConfPtr conf,
|
int __virConfSetValue (virConfPtr conf,
|
||||||
const char *setting,
|
const char *setting,
|
||||||
virConfValuePtr value);
|
virConfValuePtr value);
|
||||||
int virConfWriteFile (const char *filename,
|
int __virConfWriteFile (const char *filename,
|
||||||
virConfPtr conf);
|
virConfPtr conf);
|
||||||
int virConfWriteMem (char *memory,
|
int __virConfWriteMem (char *memory,
|
||||||
int *len,
|
int *len,
|
||||||
virConfPtr conf);
|
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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -59,8 +59,8 @@
|
|||||||
virDomainGetVcpus;
|
virDomainGetVcpus;
|
||||||
virDomainGetMaxVcpus;
|
virDomainGetMaxVcpus;
|
||||||
|
|
||||||
virDomainAttachDevice;
|
virDomainAttachDevice;
|
||||||
virDomainDetachDevice;
|
virDomainDetachDevice;
|
||||||
|
|
||||||
virConnectNumOfNetworks;
|
virConnectNumOfNetworks;
|
||||||
virConnectListNetworks;
|
virConnectListNetworks;
|
||||||
@ -83,5 +83,14 @@
|
|||||||
virNetworkGetAutostart;
|
virNetworkGetAutostart;
|
||||||
virNetworkSetAutostart;
|
virNetworkSetAutostart;
|
||||||
|
|
||||||
|
__virConfNew;
|
||||||
|
__virConfReadFile;
|
||||||
|
__virConfReadMem;
|
||||||
|
__virConfFree;
|
||||||
|
__virConfGetValue;
|
||||||
|
__virConfSetValue;
|
||||||
|
__virConfWriteFile;
|
||||||
|
__virConfWriteMem;
|
||||||
|
|
||||||
local: *;
|
local: *;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user