mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
Use a versioned linker script
This commit is contained in:
parent
41ebac421e
commit
25047e7cf8
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
||||
Mon Nov 17 10:50:00 GMT 2008 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
Switch to fully versioned linker script for exported ABI
|
||||
* configure.in: Generate src/libvirt_sym.version
|
||||
* qemud/Makefile.am: Remove use of util-lib.c
|
||||
* qemud/remote.c: Remove underscore in migrate API calls
|
||||
* src/.cvsignore: Ignore generated libvirt_sym.version
|
||||
* src/Makefile.am: Remove util-lib.c and util-lib.h
|
||||
* src/buf.c, src/buf.h, src/conf.c, src/conf.h, src/console.c,
|
||||
src/datatypes.c, src/datatypes.h, src/driver.h, src/libvirt.c,
|
||||
src/libvirt_internal.h, src/memory.c, src/memory.h, src/virsh.c:
|
||||
Remove use of __ prefix on all exported methods
|
||||
* src/util.c, src/util.h: Re-add saferead/write APIs
|
||||
* src/util-lib.c, src/util-lib.h: Remove obsolete files
|
||||
* src/libvirt_sym.version: Remove obsolete file
|
||||
* src/libvirt_sym.version.in: Master template for symbol
|
||||
versioning data
|
||||
|
||||
Mon Nov 17 10:43:00 GMT 2008 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/Makefile.am: Build drivers as libtool convenience libs
|
||||
|
@ -1076,6 +1076,7 @@ AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
|
||||
gnulib/lib/Makefile \
|
||||
gnulib/tests/Makefile \
|
||||
libvirt.pc libvirt.spec mingw32-libvirt.spec \
|
||||
src/libvirt_sym.version \
|
||||
po/Makefile.in \
|
||||
include/libvirt/Makefile include/libvirt/libvirt.h \
|
||||
python/Makefile python/tests/Makefile \
|
||||
|
@ -7,8 +7,7 @@ DAEMON_SOURCES = \
|
||||
remote_dispatch_prototypes.h \
|
||||
remote_dispatch_localvars.h \
|
||||
remote_dispatch_proc_switch.h \
|
||||
remote_protocol.h remote_protocol.c \
|
||||
$(srcdir)/../src/util-lib.c
|
||||
remote_protocol.h remote_protocol.c
|
||||
|
||||
AVAHI_SOURCES = \
|
||||
mdns.c mdns.h
|
||||
|
@ -487,7 +487,7 @@ remoteDispatchSupportsFeature (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
{
|
||||
CHECK_CONN(client);
|
||||
|
||||
ret->supported = __virDrvSupportsFeature (client->conn, args->feature);
|
||||
ret->supported = virDrvSupportsFeature (client->conn, args->feature);
|
||||
if (ret->supported == -1) return -1;
|
||||
|
||||
return 0;
|
||||
@ -1396,9 +1396,9 @@ remoteDispatchDomainMigratePrepare (struct qemud_server *server ATTRIBUTE_UNUSED
|
||||
return -2;
|
||||
}
|
||||
|
||||
r = __virDomainMigratePrepare (client->conn, &cookie, &cookielen,
|
||||
uri_in, uri_out,
|
||||
args->flags, dname, args->resource);
|
||||
r = virDomainMigratePrepare (client->conn, &cookie, &cookielen,
|
||||
uri_in, uri_out,
|
||||
args->flags, dname, args->resource);
|
||||
if (r == -1) {
|
||||
VIR_FREE(uri_out);
|
||||
return -1;
|
||||
@ -1439,11 +1439,11 @@ remoteDispatchDomainMigratePerform (struct qemud_server *server ATTRIBUTE_UNUSED
|
||||
|
||||
dname = args->dname == NULL ? NULL : *args->dname;
|
||||
|
||||
r = __virDomainMigratePerform (dom,
|
||||
args->cookie.cookie_val,
|
||||
args->cookie.cookie_len,
|
||||
args->uri,
|
||||
args->flags, dname, args->resource);
|
||||
r = virDomainMigratePerform (dom,
|
||||
args->cookie.cookie_val,
|
||||
args->cookie.cookie_len,
|
||||
args->uri,
|
||||
args->flags, dname, args->resource);
|
||||
virDomainFree (dom);
|
||||
if (r == -1) return -1;
|
||||
|
||||
@ -1460,11 +1460,11 @@ remoteDispatchDomainMigrateFinish (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
virDomainPtr ddom;
|
||||
CHECK_CONN (client);
|
||||
|
||||
ddom = __virDomainMigrateFinish (client->conn, args->dname,
|
||||
args->cookie.cookie_val,
|
||||
args->cookie.cookie_len,
|
||||
args->uri,
|
||||
args->flags);
|
||||
ddom = virDomainMigrateFinish (client->conn, args->dname,
|
||||
args->cookie.cookie_val,
|
||||
args->cookie.cookie_len,
|
||||
args->uri,
|
||||
args->flags);
|
||||
if (ddom == NULL) return -1;
|
||||
|
||||
make_nonnull_domain (&ret->ddom, ddom);
|
||||
@ -1496,10 +1496,10 @@ remoteDispatchDomainMigratePrepare2 (struct qemud_server *server ATTRIBUTE_UNUSE
|
||||
return -2;
|
||||
}
|
||||
|
||||
r = __virDomainMigratePrepare2 (client->conn, &cookie, &cookielen,
|
||||
uri_in, uri_out,
|
||||
args->flags, dname, args->resource,
|
||||
args->dom_xml);
|
||||
r = virDomainMigratePrepare2 (client->conn, &cookie, &cookielen,
|
||||
uri_in, uri_out,
|
||||
args->flags, dname, args->resource,
|
||||
args->dom_xml);
|
||||
if (r == -1) return -1;
|
||||
|
||||
/* remoteDispatchClientRequest will free cookie, uri_out and
|
||||
@ -1522,12 +1522,12 @@ remoteDispatchDomainMigrateFinish2 (struct qemud_server *server ATTRIBUTE_UNUSED
|
||||
virDomainPtr ddom;
|
||||
CHECK_CONN (client);
|
||||
|
||||
ddom = __virDomainMigrateFinish2 (client->conn, args->dname,
|
||||
args->cookie.cookie_val,
|
||||
args->cookie.cookie_len,
|
||||
args->uri,
|
||||
args->flags,
|
||||
args->retcode);
|
||||
ddom = virDomainMigrateFinish2 (client->conn, args->dname,
|
||||
args->cookie.cookie_val,
|
||||
args->cookie.cookie_len,
|
||||
args->uri,
|
||||
args->flags,
|
||||
args->retcode);
|
||||
if (ddom == NULL) return -1;
|
||||
|
||||
make_nonnull_domain (&ret->ddom, ddom);
|
||||
|
@ -15,3 +15,4 @@ libvirt_parthelper
|
||||
libvirt_lxc
|
||||
virsh-net-edit.c
|
||||
virsh-pool-edit.c
|
||||
libvirt_sym.version
|
||||
|
@ -285,7 +285,6 @@ bin_PROGRAMS = virsh
|
||||
|
||||
virsh_SOURCES = \
|
||||
console.c console.h \
|
||||
util-lib.c util-lib.h \
|
||||
virsh.c
|
||||
|
||||
virsh_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDFLAGS)
|
||||
|
10
src/buf.c
10
src/buf.c
@ -88,7 +88,7 @@ virBufferGrow(virBufferPtr buf, unsigned int len)
|
||||
*
|
||||
*/
|
||||
void
|
||||
__virBufferAdd(const virBufferPtr buf, const char *str, int len)
|
||||
virBufferAdd(const virBufferPtr buf, const char *str, int len)
|
||||
{
|
||||
unsigned int needSize;
|
||||
|
||||
@ -120,7 +120,7 @@ __virBufferAdd(const virBufferPtr buf, const char *str, int len)
|
||||
*
|
||||
*/
|
||||
void
|
||||
__virBufferAddChar (virBufferPtr buf, char c)
|
||||
virBufferAddChar (virBufferPtr buf, char c)
|
||||
{
|
||||
unsigned int needSize;
|
||||
|
||||
@ -150,7 +150,7 @@ __virBufferAddChar (virBufferPtr buf, char c)
|
||||
* Returns the buffer content or NULL in case of error.
|
||||
*/
|
||||
char *
|
||||
__virBufferContentAndReset(const virBufferPtr buf)
|
||||
virBufferContentAndReset(const virBufferPtr buf)
|
||||
{
|
||||
char *str;
|
||||
if (buf == NULL)
|
||||
@ -176,7 +176,7 @@ __virBufferContentAndReset(const virBufferPtr buf)
|
||||
* Return true if in error, 0 if normal
|
||||
*/
|
||||
int
|
||||
__virBufferError(const virBufferPtr buf)
|
||||
virBufferError(const virBufferPtr buf)
|
||||
{
|
||||
if (buf == NULL)
|
||||
return 1;
|
||||
@ -208,7 +208,7 @@ virBufferUse(const virBufferPtr buf)
|
||||
* Do a formatted print to an XML buffer.
|
||||
*/
|
||||
void
|
||||
__virBufferVSprintf(const virBufferPtr buf, const char *format, ...)
|
||||
virBufferVSprintf(const virBufferPtr buf, const char *format, ...)
|
||||
{
|
||||
int size, count, grow_size;
|
||||
va_list locarg, argptr;
|
||||
|
19
src/buf.h
19
src/buf.h
@ -34,25 +34,18 @@ struct _virBuffer {
|
||||
};
|
||||
#endif
|
||||
|
||||
char *__virBufferContentAndReset(const virBufferPtr buf);
|
||||
int __virBufferError(const virBufferPtr buf);
|
||||
char *virBufferContentAndReset(const virBufferPtr buf);
|
||||
int virBufferError(const virBufferPtr buf);
|
||||
unsigned int virBufferUse(const virBufferPtr buf);
|
||||
void __virBufferAdd(const virBufferPtr buf, const char *str, int len);
|
||||
void __virBufferAddChar(const virBufferPtr buf, char c);
|
||||
void __virBufferVSprintf(const virBufferPtr buf, const char *format, ...)
|
||||
void virBufferAdd(const virBufferPtr buf, const char *str, int len);
|
||||
void virBufferAddChar(const virBufferPtr buf, char c);
|
||||
void virBufferVSprintf(const virBufferPtr buf, const char *format, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 2, 3);
|
||||
void virBufferStrcat(const virBufferPtr buf, ...);
|
||||
void virBufferEscapeString(const virBufferPtr buf, const char *format, const char *str);
|
||||
void virBufferURIEncodeString (const virBufferPtr buf, const char *str);
|
||||
|
||||
#define virBufferAddLit(buf_, literal_string_) \
|
||||
__virBufferAdd (buf_, "" literal_string_ "", sizeof literal_string_ - 1)
|
||||
|
||||
#define virBufferAdd(b,s,l) __virBufferAdd((b),(s),(l))
|
||||
#define virBufferAddChar(b,c) __virBufferAddChar((b),(c))
|
||||
#define virBufferVSprintf(b,f,...) __virBufferVSprintf((b),(f), __VA_ARGS__)
|
||||
|
||||
#define virBufferContentAndReset(b) __virBufferContentAndReset((b))
|
||||
#define virBufferError(b) __virBufferError((b))
|
||||
virBufferAdd (buf_, "" literal_string_ "", sizeof literal_string_ - 1)
|
||||
|
||||
#endif /* __VIR_BUFFER_H__ */
|
||||
|
36
src/conf.c
36
src/conf.c
@ -142,7 +142,7 @@ virConfFreeList(virConfValuePtr list)
|
||||
* Free a value
|
||||
*/
|
||||
void
|
||||
__virConfFreeValue(virConfValuePtr val)
|
||||
virConfFreeValue(virConfValuePtr val)
|
||||
{
|
||||
if (val == NULL)
|
||||
return;
|
||||
@ -156,7 +156,7 @@ __virConfFreeValue(virConfValuePtr val)
|
||||
}
|
||||
|
||||
virConfPtr
|
||||
__virConfNew(void)
|
||||
virConfNew(void)
|
||||
{
|
||||
virConfPtr ret;
|
||||
|
||||
@ -691,7 +691,7 @@ error:
|
||||
#define MAX_CONFIG_FILE_SIZE (1024*1024*10)
|
||||
|
||||
/**
|
||||
* __virConfReadFile:
|
||||
* virConfReadFile:
|
||||
* @filename: the path to the configuration file.
|
||||
*
|
||||
* Reads a configuration file.
|
||||
@ -700,7 +700,7 @@ error:
|
||||
* read or parse the file, use virConfFree() to free the data.
|
||||
*/
|
||||
virConfPtr
|
||||
__virConfReadFile(const char *filename)
|
||||
virConfReadFile(const char *filename)
|
||||
{
|
||||
char *content;
|
||||
int len;
|
||||
@ -724,7 +724,7 @@ __virConfReadFile(const char *filename)
|
||||
}
|
||||
|
||||
/**
|
||||
* __virConfReadMem:
|
||||
* virConfReadMem:
|
||||
* @memory: pointer to the content of the configuration file
|
||||
* @len: length in byte
|
||||
*
|
||||
@ -735,7 +735,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__);
|
||||
@ -748,7 +748,7 @@ __virConfReadMem(const char *memory, int len)
|
||||
}
|
||||
|
||||
/**
|
||||
* __virConfFree:
|
||||
* virConfFree:
|
||||
* @conf: a configuration file handle
|
||||
*
|
||||
* Frees all data associated to the handle
|
||||
@ -756,7 +756,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) {
|
||||
@ -779,7 +779,7 @@ __virConfFree(virConfPtr conf)
|
||||
}
|
||||
|
||||
/**
|
||||
* __virConfGetValue:
|
||||
* virConfGetValue:
|
||||
* @conf: a configuration file handle
|
||||
* @entry: the name of the entry
|
||||
*
|
||||
@ -789,7 +789,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;
|
||||
|
||||
@ -803,7 +803,7 @@ __virConfGetValue(virConfPtr conf, const char *setting)
|
||||
}
|
||||
|
||||
/**
|
||||
* __virConfSetValue:
|
||||
* virConfSetValue:
|
||||
* @conf: a configuration file handle
|
||||
* @entry: the name of the entry
|
||||
* @value: the new configuration value
|
||||
@ -816,9 +816,9 @@ __virConfGetValue(virConfPtr conf, const char *setting)
|
||||
* Returns 0 on success, or -1 on failure.
|
||||
*/
|
||||
int
|
||||
__virConfSetValue (virConfPtr conf,
|
||||
const char *setting,
|
||||
virConfValuePtr value)
|
||||
virConfSetValue (virConfPtr conf,
|
||||
const char *setting,
|
||||
virConfValuePtr value)
|
||||
{
|
||||
virConfEntryPtr cur, prev = NULL;
|
||||
|
||||
@ -861,7 +861,7 @@ __virConfSetValue (virConfPtr conf,
|
||||
|
||||
|
||||
/**
|
||||
* __virConfWriteFile:
|
||||
* virConfWriteFile:
|
||||
* @filename: the path to the configuration file.
|
||||
* @conf: the conf
|
||||
*
|
||||
@ -870,7 +870,7 @@ __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)
|
||||
{
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
virConfEntryPtr cur;
|
||||
@ -915,7 +915,7 @@ __virConfWriteFile(const char *filename, virConfPtr conf)
|
||||
}
|
||||
|
||||
/**
|
||||
* __virConfWriteMem:
|
||||
* virConfWriteMem:
|
||||
* @memory: pointer to the memory to store the config file
|
||||
* @len: pointer to the length in bytes of the store, on output the size
|
||||
* @conf: the conf
|
||||
@ -928,7 +928,7 @@ __virConfWriteFile(const char *filename, virConfPtr conf)
|
||||
* 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)
|
||||
{
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
virConfEntryPtr cur;
|
||||
|
28
src/conf.h
28
src/conf.h
@ -61,32 +61,22 @@ 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);
|
||||
void __virConfFreeValue (virConfValuePtr val);
|
||||
int virConfFree (virConfPtr conf);
|
||||
void virConfFreeValue (virConfValuePtr val);
|
||||
|
||||
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 virConfFreeValue(v) __virConfFreeValue((v))
|
||||
#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))
|
||||
|
||||
#endif /* __VIR_CONF_H__ */
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
#include "console.h"
|
||||
#include "internal.h"
|
||||
#include "util-lib.h"
|
||||
#include "util.h"
|
||||
|
||||
/* ie Ctrl-] as per telnet */
|
||||
#define CTRL_CLOSE_BRACKET '\35'
|
||||
|
@ -239,7 +239,7 @@ virUnrefConnect(virConnectPtr conn) {
|
||||
* Returns a pointer to the domain, or NULL in case of failure
|
||||
*/
|
||||
virDomainPtr
|
||||
__virGetDomain(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
||||
virGetDomain(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
||||
virDomainPtr ret = NULL;
|
||||
|
||||
if ((!VIR_IS_CONNECT(conn)) || (name == NULL) || (uuid == NULL)) {
|
||||
@ -379,7 +379,7 @@ virUnrefDomain(virDomainPtr domain) {
|
||||
* Returns a pointer to the network, or NULL in case of failure
|
||||
*/
|
||||
virNetworkPtr
|
||||
__virGetNetwork(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
||||
virGetNetwork(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
||||
virNetworkPtr ret = NULL;
|
||||
|
||||
if ((!VIR_IS_CONNECT(conn)) || (name == NULL) || (uuid == NULL)) {
|
||||
@ -516,7 +516,7 @@ virUnrefNetwork(virNetworkPtr network) {
|
||||
* Returns a pointer to the network, or NULL in case of failure
|
||||
*/
|
||||
virStoragePoolPtr
|
||||
__virGetStoragePool(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
||||
virGetStoragePool(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
||||
virStoragePoolPtr ret = NULL;
|
||||
|
||||
if ((!VIR_IS_CONNECT(conn)) || (name == NULL) || (uuid == NULL)) {
|
||||
@ -650,7 +650,7 @@ virUnrefStoragePool(virStoragePoolPtr pool) {
|
||||
* Returns a pointer to the storage vol, or NULL in case of failure
|
||||
*/
|
||||
virStorageVolPtr
|
||||
__virGetStorageVol(virConnectPtr conn, const char *pool, const char *name, const char *key) {
|
||||
virGetStorageVol(virConnectPtr conn, const char *pool, const char *name, const char *key) {
|
||||
virStorageVolPtr ret = NULL;
|
||||
|
||||
if ((!VIR_IS_CONNECT(conn)) || (name == NULL) || (key == NULL)) {
|
||||
|
@ -184,29 +184,23 @@ struct _virStorageVol {
|
||||
|
||||
virConnectPtr virGetConnect(void);
|
||||
int virUnrefConnect(virConnectPtr conn);
|
||||
virDomainPtr __virGetDomain(virConnectPtr conn,
|
||||
virDomainPtr virGetDomain(virConnectPtr conn,
|
||||
const char *name,
|
||||
const unsigned char *uuid);
|
||||
int virUnrefDomain(virDomainPtr domain);
|
||||
virNetworkPtr __virGetNetwork(virConnectPtr conn,
|
||||
virNetworkPtr virGetNetwork(virConnectPtr conn,
|
||||
const char *name,
|
||||
const unsigned char *uuid);
|
||||
int virUnrefNetwork(virNetworkPtr network);
|
||||
|
||||
virStoragePoolPtr __virGetStoragePool(virConnectPtr conn,
|
||||
virStoragePoolPtr virGetStoragePool(virConnectPtr conn,
|
||||
const char *name,
|
||||
const unsigned char *uuid);
|
||||
int virUnrefStoragePool(virStoragePoolPtr pool);
|
||||
virStorageVolPtr __virGetStorageVol(virConnectPtr conn,
|
||||
virStorageVolPtr virGetStorageVol(virConnectPtr conn,
|
||||
const char *pool,
|
||||
const char *name,
|
||||
const char *key);
|
||||
int virUnrefStorageVol(virStorageVolPtr vol);
|
||||
|
||||
#define virGetDomain(c,n,u) __virGetDomain((c),(n),(u))
|
||||
#define virGetNetwork(c,n,u) __virGetNetwork((c),(n),(u))
|
||||
#define virGetStoragePool(c,n,u) __virGetStoragePool((c),(n),(u))
|
||||
#define virGetStorageVol(c,p,n,u) __virGetStorageVol((c),(p),(n),(u))
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -78,7 +78,7 @@ typedef virDrvOpenStatus
|
||||
typedef int
|
||||
(*virDrvClose) (virConnectPtr conn);
|
||||
typedef int
|
||||
(*virDrvSupportsFeature) (virConnectPtr conn, int feature);
|
||||
(*virDrvDrvSupportsFeature) (virConnectPtr conn, int feature);
|
||||
typedef const char *
|
||||
(*virDrvGetType) (virConnectPtr conn);
|
||||
typedef int
|
||||
@ -332,7 +332,7 @@ struct _virDriver {
|
||||
virDrvProbe probe;
|
||||
virDrvOpen open;
|
||||
virDrvClose close;
|
||||
virDrvSupportsFeature supports_feature;
|
||||
virDrvDrvSupportsFeature supports_feature;
|
||||
virDrvGetType type;
|
||||
virDrvGetVersion version;
|
||||
virDrvGetHostname getHostname;
|
||||
|
@ -579,7 +579,7 @@ virRegisterStateDriver(virStateDriverPtr driver)
|
||||
return virStateDriverTabCount++;
|
||||
}
|
||||
|
||||
int __virStateInitialize(void) {
|
||||
int virStateInitialize(void) {
|
||||
int i, ret = 0;
|
||||
|
||||
if (virInitialize() < 0)
|
||||
@ -593,7 +593,7 @@ int __virStateInitialize(void) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int __virStateCleanup(void) {
|
||||
int virStateCleanup(void) {
|
||||
int i, ret = 0;
|
||||
|
||||
for (i = 0 ; i < virStateDriverTabCount ; i++) {
|
||||
@ -604,7 +604,7 @@ int __virStateCleanup(void) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int __virStateReload(void) {
|
||||
int virStateReload(void) {
|
||||
int i, ret = 0;
|
||||
|
||||
for (i = 0 ; i < virStateDriverTabCount ; i++) {
|
||||
@ -615,7 +615,7 @@ int __virStateReload(void) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int __virStateActive(void) {
|
||||
int virStateActive(void) {
|
||||
int i, ret = 0;
|
||||
|
||||
for (i = 0 ; i < virStateDriverTabCount ; i++) {
|
||||
@ -967,7 +967,7 @@ virConnectClose(virConnectPtr conn)
|
||||
* implementation of driver features in the remote case.
|
||||
*/
|
||||
int
|
||||
__virDrvSupportsFeature (virConnectPtr conn, int feature)
|
||||
virDrvSupportsFeature (virConnectPtr conn, int feature)
|
||||
{
|
||||
DEBUG("conn=%p, feature=%d", conn, feature);
|
||||
|
||||
@ -2305,7 +2305,7 @@ virDomainMigrate (virDomainPtr domain,
|
||||
* implementation of migration in the remote case.
|
||||
*/
|
||||
int
|
||||
__virDomainMigratePrepare (virConnectPtr dconn,
|
||||
virDomainMigratePrepare (virConnectPtr dconn,
|
||||
char **cookie,
|
||||
int *cookielen,
|
||||
const char *uri_in,
|
||||
@ -2334,7 +2334,7 @@ __virDomainMigratePrepare (virConnectPtr dconn,
|
||||
* implementation of migration in the remote case.
|
||||
*/
|
||||
int
|
||||
__virDomainMigratePerform (virDomainPtr domain,
|
||||
virDomainMigratePerform (virDomainPtr domain,
|
||||
const char *cookie,
|
||||
int cookielen,
|
||||
const char *uri,
|
||||
@ -2364,7 +2364,7 @@ __virDomainMigratePerform (virDomainPtr domain,
|
||||
* implementation of migration in the remote case.
|
||||
*/
|
||||
virDomainPtr
|
||||
__virDomainMigrateFinish (virConnectPtr dconn,
|
||||
virDomainMigrateFinish (virConnectPtr dconn,
|
||||
const char *dname,
|
||||
const char *cookie,
|
||||
int cookielen,
|
||||
@ -2392,15 +2392,15 @@ __virDomainMigrateFinish (virConnectPtr dconn,
|
||||
* implementation of migration in the remote case.
|
||||
*/
|
||||
int
|
||||
__virDomainMigratePrepare2 (virConnectPtr dconn,
|
||||
char **cookie,
|
||||
int *cookielen,
|
||||
const char *uri_in,
|
||||
char **uri_out,
|
||||
unsigned long flags,
|
||||
const char *dname,
|
||||
unsigned long bandwidth,
|
||||
const char *dom_xml)
|
||||
virDomainMigratePrepare2 (virConnectPtr dconn,
|
||||
char **cookie,
|
||||
int *cookielen,
|
||||
const char *uri_in,
|
||||
char **uri_out,
|
||||
unsigned long flags,
|
||||
const char *dname,
|
||||
unsigned long bandwidth,
|
||||
const char *dom_xml)
|
||||
{
|
||||
DEBUG("dconn=%p, cookie=%p, cookielen=%p, uri_in=%s, uri_out=%p, flags=%lu, dname=%s, bandwidth=%lu, dom_xml=%s", dconn, cookie, cookielen, uri_in, uri_out, flags, dname, bandwidth, dom_xml);
|
||||
|
||||
@ -2423,13 +2423,13 @@ __virDomainMigratePrepare2 (virConnectPtr dconn,
|
||||
* implementation of migration in the remote case.
|
||||
*/
|
||||
virDomainPtr
|
||||
__virDomainMigrateFinish2 (virConnectPtr dconn,
|
||||
const char *dname,
|
||||
const char *cookie,
|
||||
int cookielen,
|
||||
const char *uri,
|
||||
unsigned long flags,
|
||||
int retcode)
|
||||
virDomainMigrateFinish2 (virConnectPtr dconn,
|
||||
const char *dname,
|
||||
const char *cookie,
|
||||
int cookielen,
|
||||
const char *uri,
|
||||
unsigned long flags,
|
||||
int retcode)
|
||||
{
|
||||
DEBUG("dconn=%p, dname=%s, cookie=%p, cookielen=%d, uri=%s, flags=%lu, retcode=%d", dconn, dname, cookie, cookielen, uri, flags, retcode);
|
||||
|
||||
|
@ -26,55 +26,51 @@
|
||||
|
||||
|
||||
#ifdef WITH_LIBVIRTD
|
||||
int __virStateInitialize(void);
|
||||
int __virStateCleanup(void);
|
||||
int __virStateReload(void);
|
||||
int __virStateActive(void);
|
||||
#define virStateInitialize() __virStateInitialize()
|
||||
#define virStateCleanup() __virStateCleanup()
|
||||
#define virStateReload() __virStateReload()
|
||||
#define virStateActive() __virStateActive()
|
||||
int virStateInitialize(void);
|
||||
int virStateCleanup(void);
|
||||
int virStateReload(void);
|
||||
int virStateActive(void);
|
||||
#endif
|
||||
|
||||
int __virDrvSupportsFeature (virConnectPtr conn, int feature);
|
||||
int virDrvSupportsFeature (virConnectPtr conn, int feature);
|
||||
|
||||
int __virDomainMigratePrepare (virConnectPtr dconn,
|
||||
char **cookie,
|
||||
int *cookielen,
|
||||
const char *uri_in,
|
||||
char **uri_out,
|
||||
unsigned long flags,
|
||||
const char *dname,
|
||||
unsigned long bandwidth);
|
||||
int __virDomainMigratePerform (virDomainPtr domain,
|
||||
const char *cookie,
|
||||
int cookielen,
|
||||
const char *uri,
|
||||
unsigned long flags,
|
||||
const char *dname,
|
||||
unsigned long bandwidth);
|
||||
virDomainPtr __virDomainMigrateFinish (virConnectPtr dconn,
|
||||
const char *dname,
|
||||
const char *cookie,
|
||||
int cookielen,
|
||||
const char *uri,
|
||||
unsigned long flags);
|
||||
int __virDomainMigratePrepare2 (virConnectPtr dconn,
|
||||
char **cookie,
|
||||
int *cookielen,
|
||||
const char *uri_in,
|
||||
char **uri_out,
|
||||
unsigned long flags,
|
||||
const char *dname,
|
||||
unsigned long bandwidth,
|
||||
const char *dom_xml);
|
||||
virDomainPtr __virDomainMigrateFinish2 (virConnectPtr dconn,
|
||||
const char *dname,
|
||||
const char *cookie,
|
||||
int cookielen,
|
||||
const char *uri,
|
||||
unsigned long flags,
|
||||
int retcode);
|
||||
int virDomainMigratePrepare (virConnectPtr dconn,
|
||||
char **cookie,
|
||||
int *cookielen,
|
||||
const char *uri_in,
|
||||
char **uri_out,
|
||||
unsigned long flags,
|
||||
const char *dname,
|
||||
unsigned long bandwidth);
|
||||
int virDomainMigratePerform (virDomainPtr domain,
|
||||
const char *cookie,
|
||||
int cookielen,
|
||||
const char *uri,
|
||||
unsigned long flags,
|
||||
const char *dname,
|
||||
unsigned long bandwidth);
|
||||
virDomainPtr virDomainMigrateFinish (virConnectPtr dconn,
|
||||
const char *dname,
|
||||
const char *cookie,
|
||||
int cookielen,
|
||||
const char *uri,
|
||||
unsigned long flags);
|
||||
int virDomainMigratePrepare2 (virConnectPtr dconn,
|
||||
char **cookie,
|
||||
int *cookielen,
|
||||
const char *uri_in,
|
||||
char **uri_out,
|
||||
unsigned long flags,
|
||||
const char *dname,
|
||||
unsigned long bandwidth,
|
||||
const char *dom_xml);
|
||||
virDomainPtr virDomainMigrateFinish2 (virConnectPtr dconn,
|
||||
const char *dname,
|
||||
const char *cookie,
|
||||
int cookielen,
|
||||
const char *uri,
|
||||
unsigned long flags,
|
||||
int retcode);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,205 +0,0 @@
|
||||
{
|
||||
global:
|
||||
virInitialize;
|
||||
virConnectOpen;
|
||||
virConnectOpenReadOnly;
|
||||
virConnectOpenAuth;
|
||||
virConnectAuthPtrDefault;
|
||||
|
||||
virConnectClose;
|
||||
virConnectGetType;
|
||||
virConnectGetVersion;
|
||||
virConnectGetHostname;
|
||||
virConnectGetURI;
|
||||
virDomainGetConnect;
|
||||
virConnectListDomains;
|
||||
virConnectNumOfDomains;
|
||||
virDomainCreate;
|
||||
virDomainCreateLinux;
|
||||
virDomainCreateXML;
|
||||
virDomainDefineXML;
|
||||
virDomainDestroy;
|
||||
virDomainFree;
|
||||
virDomainGetID;
|
||||
virDomainGetUUID;
|
||||
virDomainGetUUIDString;
|
||||
virDomainGetInfo;
|
||||
virNodeGetCellsFreeMemory;
|
||||
virDomainGetMaxMemory;
|
||||
virDomainGetName;
|
||||
virDomainGetOSType;
|
||||
virDomainGetXMLDesc;
|
||||
virDomainLookupByID;
|
||||
virDomainLookupByName;
|
||||
virDomainLookupByUUID;
|
||||
virDomainLookupByUUIDString;
|
||||
virDomainRestore;
|
||||
virDomainResume;
|
||||
virDomainSave;
|
||||
virDomainCoreDump;
|
||||
virDomainSetMemory;
|
||||
virDomainSetMaxMemory;
|
||||
virDomainShutdown;
|
||||
virDomainReboot;
|
||||
virDomainSuspend;
|
||||
virConnectListDefinedDomains;
|
||||
virConnectNumOfDefinedDomains;
|
||||
virConnectGetMaxVcpus;
|
||||
virDomainUndefine;
|
||||
virDomainGetAutostart;
|
||||
virDomainSetAutostart;
|
||||
virGetVersion;
|
||||
virCopyLastError;
|
||||
virConnSetErrorFunc;
|
||||
virResetLastError;
|
||||
virErrorFunc;
|
||||
virResetError;
|
||||
virConnGetLastError;
|
||||
virGetLastError;
|
||||
virSetErrorFunc;
|
||||
virConnCopyLastError;
|
||||
virConnResetLastError;
|
||||
virDefaultErrorFunc;
|
||||
virNodeGetInfo;
|
||||
virConnectGetCapabilities;
|
||||
virNodeGetCellsFreeMemory;
|
||||
virNodeGetFreeMemory;
|
||||
|
||||
virDomainSetVcpus;
|
||||
virDomainPinVcpu;
|
||||
virDomainGetVcpus;
|
||||
virDomainGetMaxVcpus;
|
||||
virDomainGetSchedulerType;
|
||||
virDomainGetSchedulerParameters;
|
||||
virDomainSetSchedulerParameters;
|
||||
virDomainBlockStats;
|
||||
virDomainInterfaceStats;
|
||||
virDomainBlockPeek;
|
||||
virDomainMemoryPeek;
|
||||
virDomainAttachDevice;
|
||||
virDomainDetachDevice;
|
||||
|
||||
virDomainMigrate;
|
||||
|
||||
virNetworkGetConnect;
|
||||
virConnectNumOfNetworks;
|
||||
virConnectListNetworks;
|
||||
virConnectNumOfDefinedNetworks;
|
||||
virConnectListDefinedNetworks;
|
||||
virNetworkLookupByName;
|
||||
virNetworkLookupByUUID;
|
||||
virNetworkLookupByUUIDString;
|
||||
virNetworkCreateXML;
|
||||
virNetworkDefineXML;
|
||||
virNetworkUndefine;
|
||||
virNetworkCreate;
|
||||
virNetworkDestroy;
|
||||
virNetworkFree;
|
||||
virNetworkGetName;
|
||||
virNetworkGetUUID;
|
||||
virNetworkGetUUIDString;
|
||||
virNetworkGetXMLDesc;
|
||||
virNetworkGetBridgeName;
|
||||
virNetworkGetAutostart;
|
||||
virNetworkSetAutostart;
|
||||
|
||||
virStoragePoolGetConnect;
|
||||
virConnectNumOfStoragePools;
|
||||
virConnectNumOfDefinedStoragePools;
|
||||
virConnectListStoragePools;
|
||||
virConnectListDefinedStoragePools;
|
||||
virConnectFindStoragePoolSources;
|
||||
virStoragePoolLookupByName;
|
||||
virStoragePoolLookupByUUID;
|
||||
virStoragePoolLookupByUUIDString;
|
||||
virStoragePoolLookupByVolume;
|
||||
virStoragePoolCreateXML;
|
||||
virStoragePoolDefineXML;
|
||||
virStoragePoolUndefine;
|
||||
virStoragePoolCreate;
|
||||
virStoragePoolBuild;
|
||||
virStoragePoolDestroy;
|
||||
virStoragePoolDelete;
|
||||
virStoragePoolRefresh;
|
||||
virStoragePoolFree;
|
||||
virStoragePoolGetName;
|
||||
virStoragePoolGetUUID;
|
||||
virStoragePoolGetUUIDString;
|
||||
virStoragePoolGetInfo;
|
||||
virStoragePoolGetXMLDesc;
|
||||
virStoragePoolSetAutostart;
|
||||
virStoragePoolGetAutostart;
|
||||
virStoragePoolNumOfVolumes;
|
||||
virStoragePoolListVolumes;
|
||||
|
||||
virConnectNumOfStorageVolumes;
|
||||
virConnectListStorageVolumes;
|
||||
virStorageVolGetConnect;
|
||||
virStorageVolLookupByName;
|
||||
virStorageVolLookupByKey;
|
||||
virStorageVolLookupByPath;
|
||||
virStorageVolCreateXML;
|
||||
virStorageVolDelete;
|
||||
virStorageVolFree;
|
||||
virStorageVolGetName;
|
||||
virStorageVolGetKey;
|
||||
virStorageVolGetInfo;
|
||||
virStorageVolGetXMLDesc;
|
||||
virStorageVolGetPath;
|
||||
|
||||
virEventRegisterImpl;
|
||||
virConnectDomainEventRegister;
|
||||
virConnectDomainEventDeregister;
|
||||
|
||||
/* Symbols with __ are private only
|
||||
for use by the libvirtd daemon.
|
||||
They are not part of stable ABI
|
||||
guarentee provided for the public
|
||||
symbols above */
|
||||
|
||||
__virConfNew;
|
||||
__virConfReadFile;
|
||||
__virConfReadMem;
|
||||
__virConfFree;
|
||||
__virConfGetValue;
|
||||
__virConfSetValue;
|
||||
__virConfWriteFile;
|
||||
__virConfWriteMem;
|
||||
|
||||
__virGetDomain;
|
||||
__virGetNetwork;
|
||||
__virGetStoragePool;
|
||||
__virGetStorageVol;
|
||||
|
||||
__virStateInitialize;
|
||||
__virStateCleanup;
|
||||
__virStateReload;
|
||||
__virStateActive;
|
||||
__virStateSigDispatcher;
|
||||
|
||||
__virDrvSupportsFeature;
|
||||
|
||||
__virDomainMigratePrepare;
|
||||
__virDomainMigratePerform;
|
||||
__virDomainMigrateFinish;
|
||||
__virDomainMigratePrepare2;
|
||||
__virDomainMigrateFinish2;
|
||||
|
||||
__virFileReadAll;
|
||||
__virStrToLong_i;
|
||||
__virStrToLong_ull;
|
||||
|
||||
__virBufferVSprintf;
|
||||
__virBufferAdd;
|
||||
__virBufferAddChar;
|
||||
__virBufferContentAndReset;
|
||||
__virBufferError;
|
||||
|
||||
__virMacAddrCompare;
|
||||
|
||||
__virAlloc;
|
||||
__virAllocN;
|
||||
__virReallocN;
|
||||
__virFree;
|
||||
local: *;
|
||||
};
|
320
src/libvirt_sym.version.in
Normal file
320
src/libvirt_sym.version.in
Normal file
@ -0,0 +1,320 @@
|
||||
/*
|
||||
* WARNING: libvirt_sym.version.in is the master file
|
||||
*
|
||||
* WARNING: libvirt_sym.version is auto-generated by configure
|
||||
*/
|
||||
|
||||
/*
|
||||
* First officially exported symbols, for which header
|
||||
* file definitions are installed in /usr/include/libvirt
|
||||
* either from libvirt.h and virterror.h
|
||||
*
|
||||
* Versions here are *fixed* to match the libvirt version
|
||||
* at which the symbol was introduced. This ensures that
|
||||
* a new client app requiring symbol foo() can't accidentally
|
||||
* run with old libvirt.so not providing foo() - the global
|
||||
* soname version info can't enforce this since we never
|
||||
* change the soname
|
||||
*/
|
||||
LIBVIRT_0.0.3 {
|
||||
global:
|
||||
virConnectClose;
|
||||
virConnectGetType;
|
||||
virConnectGetVersion;
|
||||
virConnectListDomains;
|
||||
virConnectNumOfDomains;
|
||||
virConnectOpen;
|
||||
virConnectOpenReadOnly;
|
||||
|
||||
virDomainCreateLinux;
|
||||
virDomainDestroy;
|
||||
virDomainFree;
|
||||
virDomainGetID;
|
||||
virDomainGetInfo;
|
||||
virDomainGetMaxMemory;
|
||||
virDomainGetName;
|
||||
virDomainGetOSType;
|
||||
virDomainGetXMLDesc;
|
||||
virDomainLookupByID;
|
||||
virDomainLookupByName;
|
||||
virDomainRestore;
|
||||
virDomainResume;
|
||||
virDomainSave;
|
||||
virDomainSetMaxMemory;
|
||||
virDomainShutdown;
|
||||
virDomainSuspend;
|
||||
|
||||
virGetVersion;
|
||||
};
|
||||
|
||||
LIBVIRT_0.0.5 {
|
||||
global:
|
||||
virDomainLookupByUUID;
|
||||
virDomainGetUUID;
|
||||
} LIBVIRT_0.0.3;
|
||||
|
||||
LIBVIRT_0.1.0 {
|
||||
global:
|
||||
virInitialize;
|
||||
virNodeGetInfo;
|
||||
virDomainReboot;
|
||||
|
||||
virCopyLastError;
|
||||
virConnSetErrorFunc;
|
||||
virResetLastError;
|
||||
virErrorFunc;
|
||||
virResetError;
|
||||
virConnGetLastError;
|
||||
virGetLastError;
|
||||
virSetErrorFunc;
|
||||
virConnCopyLastError;
|
||||
virConnResetLastError;
|
||||
virDefaultErrorFunc;
|
||||
} LIBVIRT_0.0.5;
|
||||
|
||||
LIBVIRT_0.1.1 {
|
||||
global:
|
||||
virDomainLookupByUUIDString;
|
||||
virDomainGetUUIDString;
|
||||
virDomainSetMemory;
|
||||
virDomainDefineXML;
|
||||
virDomainCreate;
|
||||
virDomainUndefine;
|
||||
virConnectListDefinedDomains;
|
||||
} LIBVIRT_0.1.0;
|
||||
|
||||
LIBVIRT_0.1.4 {
|
||||
global:
|
||||
virDomainSetVcpus;
|
||||
virDomainPinVcpu;
|
||||
virDomainGetVcpus;
|
||||
} LIBVIRT_0.1.1;
|
||||
|
||||
LIBVIRT_0.1.5 {
|
||||
global:
|
||||
virConnectNumOfDefinedDomains;
|
||||
} LIBVIRT_0.1.4;
|
||||
|
||||
LIBVIRT_0.1.9 {
|
||||
global:
|
||||
virDomainCoreDump;
|
||||
virDomainAttachDevice;
|
||||
virDomainDetachDevice;
|
||||
} LIBVIRT_0.1.5;
|
||||
|
||||
LIBVIRT_0.2.0 {
|
||||
global:
|
||||
virConnectNumOfNetworks;
|
||||
virConnectListNetworks;
|
||||
virConnectNumOfDefinedNetworks;
|
||||
virConnectListDefinedNetworks;
|
||||
virNetworkLookupByName;
|
||||
virNetworkLookupByUUID;
|
||||
virNetworkLookupByUUIDString;
|
||||
virNetworkCreateXML;
|
||||
virNetworkDefineXML;
|
||||
virNetworkUndefine;
|
||||
virNetworkCreate;
|
||||
virNetworkDestroy;
|
||||
virNetworkFree;
|
||||
virNetworkGetName;
|
||||
virNetworkGetUUID;
|
||||
virNetworkGetUUIDString;
|
||||
virNetworkGetXMLDesc;
|
||||
virNetworkGetBridgeName;
|
||||
} LIBVIRT_0.1.9;
|
||||
|
||||
LIBVIRT_0.2.1 {
|
||||
global:
|
||||
virConnectGetCapabilities;
|
||||
virConnectGetMaxVcpus;
|
||||
virDomainGetMaxVcpus;
|
||||
virDomainGetAutostart;
|
||||
virDomainSetAutostart;
|
||||
virNetworkGetAutostart;
|
||||
virNetworkSetAutostart;
|
||||
} LIBVIRT_0.2.0;
|
||||
|
||||
LIBVIRT_0.2.3 {
|
||||
global:
|
||||
virDomainGetSchedulerType;
|
||||
virDomainGetSchedulerParameters;
|
||||
virDomainSetSchedulerParameters;
|
||||
} LIBVIRT_0.2.1;
|
||||
|
||||
LIBVIRT_0.3.0 {
|
||||
global:
|
||||
virConnectGetHostname;
|
||||
virConnectGetURI;
|
||||
virDomainGetConnect;
|
||||
virNetworkGetConnect;
|
||||
} LIBVIRT_0.2.3;
|
||||
|
||||
LIBVIRT_0.3.2 {
|
||||
global:
|
||||
virDomainMigrate;
|
||||
virDomainBlockStats;
|
||||
virDomainInterfaceStats;
|
||||
} LIBVIRT_0.3.0;
|
||||
|
||||
LIBVIRT_0.3.3 {
|
||||
global:
|
||||
virNodeGetCellsFreeMemory;
|
||||
virNodeGetFreeMemory;
|
||||
} LIBVIRT_0.3.2;
|
||||
|
||||
LIBVIRT_0.4.0 {
|
||||
global:
|
||||
virConnectOpenAuth;
|
||||
virConnectAuthPtrDefault;
|
||||
} LIBVIRT_0.3.3;
|
||||
|
||||
LIBVIRT_0.4.1 {
|
||||
global:
|
||||
virStoragePoolGetConnect;
|
||||
virConnectNumOfStoragePools;
|
||||
virConnectNumOfDefinedStoragePools;
|
||||
virConnectListStoragePools;
|
||||
virConnectListDefinedStoragePools;
|
||||
virStoragePoolLookupByName;
|
||||
virStoragePoolLookupByUUID;
|
||||
virStoragePoolLookupByUUIDString;
|
||||
virStoragePoolLookupByVolume;
|
||||
virStoragePoolCreateXML;
|
||||
virStoragePoolDefineXML;
|
||||
virStoragePoolUndefine;
|
||||
virStoragePoolCreate;
|
||||
virStoragePoolBuild;
|
||||
virStoragePoolDestroy;
|
||||
virStoragePoolDelete;
|
||||
virStoragePoolRefresh;
|
||||
virStoragePoolFree;
|
||||
virStoragePoolGetName;
|
||||
virStoragePoolGetUUID;
|
||||
virStoragePoolGetUUIDString;
|
||||
virStoragePoolGetInfo;
|
||||
virStoragePoolGetXMLDesc;
|
||||
virStoragePoolSetAutostart;
|
||||
virStoragePoolGetAutostart;
|
||||
virStoragePoolNumOfVolumes;
|
||||
virStoragePoolListVolumes;
|
||||
|
||||
virConnectNumOfStorageVolumes;
|
||||
virConnectListStorageVolumes;
|
||||
virStorageVolGetConnect;
|
||||
virStorageVolLookupByName;
|
||||
virStorageVolLookupByKey;
|
||||
virStorageVolLookupByPath;
|
||||
virStorageVolCreateXML;
|
||||
virStorageVolDelete;
|
||||
virStorageVolFree;
|
||||
virStorageVolGetName;
|
||||
virStorageVolGetKey;
|
||||
virStorageVolGetInfo;
|
||||
virStorageVolGetXMLDesc;
|
||||
virStorageVolGetPath;
|
||||
} LIBVIRT_0.4.0;
|
||||
|
||||
LIBVIRT_0.4.2 {
|
||||
global:
|
||||
virDomainBlockPeek;
|
||||
virDomainMemoryPeek;
|
||||
} LIBVIRT_0.4.1;
|
||||
|
||||
LIBVIRT_0.4.5 {
|
||||
global:
|
||||
virConnectFindStoragePoolSources;
|
||||
} LIBVIRT_0.4.2;
|
||||
|
||||
LIBVIRT_0.5.0 {
|
||||
global:
|
||||
virDomainCreateXML;
|
||||
virEventRegisterImpl;
|
||||
virConnectDomainEventRegister;
|
||||
virConnectDomainEventDeregister;
|
||||
} LIBVIRT_0.4.5;
|
||||
|
||||
/* .... define new API here using predicted next version number .... */
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Finally these symbols are private and semantics may change
|
||||
* on every release, hence the version number is spliced in at
|
||||
* build time. This ensures that if libvirtd, virsh, or a driver
|
||||
* module was built against one libvirt release, it will refuse
|
||||
* to load with another where symbols may have same names but
|
||||
* different semantics.
|
||||
*
|
||||
* No header files are provided outside the source tree.
|
||||
*
|
||||
* Keep this section ordered alphabetically by header file name
|
||||
*
|
||||
* Symbols here are only for use by virsh, libvirtd and dlopen
|
||||
* driver modules
|
||||
*/
|
||||
LIBVIRT_PRIVATE_@VERSION@ {
|
||||
|
||||
global:
|
||||
|
||||
/* buf.h */
|
||||
virBufferVSprintf;
|
||||
virBufferAdd;
|
||||
virBufferAddChar;
|
||||
virBufferContentAndReset;
|
||||
virBufferError;
|
||||
|
||||
|
||||
/* conf.h */
|
||||
virConfNew;
|
||||
virConfReadFile;
|
||||
virConfReadMem;
|
||||
virConfFree;
|
||||
virConfGetValue;
|
||||
virConfSetValue;
|
||||
virConfWriteFile;
|
||||
virConfWriteMem;
|
||||
|
||||
|
||||
/* datatypes.h */
|
||||
virGetDomain;
|
||||
virGetNetwork;
|
||||
virGetStoragePool;
|
||||
virGetStorageVol;
|
||||
|
||||
|
||||
/* libvirt_internal.h */
|
||||
virStateInitialize;
|
||||
virStateCleanup;
|
||||
virStateReload;
|
||||
virStateActive;
|
||||
virStateSigDispatcher;
|
||||
virDrvSupportsFeature;
|
||||
virDomainMigratePrepare;
|
||||
virDomainMigratePerform;
|
||||
virDomainMigrateFinish;
|
||||
virDomainMigratePrepare2;
|
||||
virDomainMigrateFinish2;
|
||||
|
||||
|
||||
/* memory.h */
|
||||
virAlloc;
|
||||
virAllocN;
|
||||
virReallocN;
|
||||
virFree;
|
||||
|
||||
|
||||
/* util.h */
|
||||
virFileReadAll;
|
||||
virStrToLong_i;
|
||||
virStrToLong_ull;
|
||||
saferead;
|
||||
safewrite;
|
||||
virMacAddrCompare;
|
||||
|
||||
|
||||
/* Finally everything else is totally private */
|
||||
local:
|
||||
*;
|
||||
};
|
@ -88,7 +88,7 @@ static int virAllocTestFail(void)
|
||||
*
|
||||
* Returns -1 on failure to allocate, zero on success
|
||||
*/
|
||||
int __virAlloc(void *ptrptr, size_t size)
|
||||
int virAlloc(void *ptrptr, size_t size)
|
||||
{
|
||||
#if TEST_OOM
|
||||
if (virAllocTestFail()) {
|
||||
@ -116,7 +116,7 @@ int __virAlloc(void *ptrptr, size_t size)
|
||||
*
|
||||
* Returns -1 on failure to allocate, zero on success
|
||||
*/
|
||||
int __virAllocN(void *ptrptr, size_t size, size_t count)
|
||||
int virAllocN(void *ptrptr, size_t size, size_t count)
|
||||
{
|
||||
#if TEST_OOM
|
||||
if (virAllocTestFail()) {
|
||||
@ -145,7 +145,7 @@ int __virAllocN(void *ptrptr, size_t size, size_t count)
|
||||
*
|
||||
* Returns -1 on failure to allocate, zero on success
|
||||
*/
|
||||
int __virReallocN(void *ptrptr, size_t size, size_t count)
|
||||
int virReallocN(void *ptrptr, size_t size, size_t count)
|
||||
{
|
||||
void *tmp;
|
||||
#if TEST_OOM
|
||||
@ -172,7 +172,7 @@ int __virReallocN(void *ptrptr, size_t size, size_t count)
|
||||
* the 'ptrptr' variable. After release, 'ptrptr' will be
|
||||
* updated to point to NULL.
|
||||
*/
|
||||
void __virFree(void *ptrptr)
|
||||
void virFree(void *ptrptr)
|
||||
{
|
||||
free(*(void**)ptrptr);
|
||||
*(void**)ptrptr = NULL;
|
||||
|
16
src/memory.h
16
src/memory.h
@ -45,10 +45,10 @@
|
||||
|
||||
|
||||
/* Don't call these directly - use the macros below */
|
||||
int __virAlloc(void *ptrptr, size_t size) ATTRIBUTE_RETURN_CHECK;
|
||||
int __virAllocN(void *ptrptr, size_t size, size_t count) ATTRIBUTE_RETURN_CHECK;
|
||||
int __virReallocN(void *ptrptr, size_t size, size_t count) ATTRIBUTE_RETURN_CHECK;
|
||||
void __virFree(void *ptrptr);
|
||||
int virAlloc(void *ptrptr, size_t size) ATTRIBUTE_RETURN_CHECK;
|
||||
int virAllocN(void *ptrptr, size_t size, size_t count) ATTRIBUTE_RETURN_CHECK;
|
||||
int virReallocN(void *ptrptr, size_t size, size_t count) ATTRIBUTE_RETURN_CHECK;
|
||||
void virFree(void *ptrptr);
|
||||
|
||||
/**
|
||||
* VIR_ALLOC:
|
||||
@ -60,7 +60,7 @@ void __virFree(void *ptrptr);
|
||||
*
|
||||
* Returns -1 on failure, 0 on success
|
||||
*/
|
||||
#define VIR_ALLOC(ptr) __virAlloc(&(ptr), sizeof(*(ptr)))
|
||||
#define VIR_ALLOC(ptr) virAlloc(&(ptr), sizeof(*(ptr)))
|
||||
|
||||
/**
|
||||
* VIR_ALLOC_N:
|
||||
@ -73,7 +73,7 @@ void __virFree(void *ptrptr);
|
||||
*
|
||||
* Returns -1 on failure, 0 on success
|
||||
*/
|
||||
#define VIR_ALLOC_N(ptr, count) __virAllocN(&(ptr), sizeof(*(ptr)), (count))
|
||||
#define VIR_ALLOC_N(ptr, count) virAllocN(&(ptr), sizeof(*(ptr)), (count))
|
||||
|
||||
/**
|
||||
* VIR_REALLOC_N:
|
||||
@ -86,7 +86,7 @@ void __virFree(void *ptrptr);
|
||||
*
|
||||
* Returns -1 on failure, 0 on success
|
||||
*/
|
||||
#define VIR_REALLOC_N(ptr, count) __virReallocN(&(ptr), sizeof(*(ptr)), (count))
|
||||
#define VIR_REALLOC_N(ptr, count) virReallocN(&(ptr), sizeof(*(ptr)), (count))
|
||||
|
||||
/**
|
||||
* VIR_FREE:
|
||||
@ -95,7 +95,7 @@ void __virFree(void *ptrptr);
|
||||
* Free the memory stored in 'ptr' and update to point
|
||||
* to NULL.
|
||||
*/
|
||||
#define VIR_FREE(ptr) __virFree(&(ptr))
|
||||
#define VIR_FREE(ptr) virFree(&(ptr))
|
||||
|
||||
|
||||
#if TEST_OOM
|
||||
|
@ -1,52 +0,0 @@
|
||||
/*
|
||||
* common, generic utility functions
|
||||
*
|
||||
* Copyright (C) 2006, 2007, 2008 Red Hat, Inc.
|
||||
* See COPYING.LIB for the License of this software
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "util-lib.h"
|
||||
|
||||
/* Like read(), but restarts after EINTR */
|
||||
int saferead(int fd, void *buf, size_t count)
|
||||
{
|
||||
size_t nread = 0;
|
||||
while (count > 0) {
|
||||
ssize_t r = read(fd, buf, count);
|
||||
if (r < 0 && errno == EINTR)
|
||||
continue;
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0)
|
||||
return nread;
|
||||
buf = (char *)buf + r;
|
||||
count -= r;
|
||||
nread += r;
|
||||
}
|
||||
return nread;
|
||||
}
|
||||
|
||||
/* Like write(), but restarts after EINTR */
|
||||
ssize_t safewrite(int fd, const void *buf, size_t count)
|
||||
{
|
||||
size_t nwritten = 0;
|
||||
while (count > 0) {
|
||||
ssize_t r = write(fd, buf, count);
|
||||
|
||||
if (r < 0 && errno == EINTR)
|
||||
continue;
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0)
|
||||
return nwritten;
|
||||
buf = (const char *)buf + r;
|
||||
count -= r;
|
||||
nwritten += r;
|
||||
}
|
||||
return nwritten;
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* private utility functions
|
||||
*
|
||||
* Copyright (C) 2008 Red Hat, Inc.
|
||||
* See COPYING.LIB for the License of this software
|
||||
*/
|
||||
|
||||
#ifndef __UTIL_LIB_H__
|
||||
#define __UTIL_LIB_H__
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* To avoid a double definition of the function when compiling
|
||||
* programs using both util-lib and libvirt, like virsh
|
||||
*/
|
||||
#ifdef IN_LIBVIRT
|
||||
#define saferead libvirt_saferead
|
||||
#define safewrite libvirt_safewrite
|
||||
#endif
|
||||
|
||||
int saferead(int fd, void *buf, size_t count);
|
||||
ssize_t safewrite(int fd, const void *buf, size_t count);
|
||||
|
||||
#endif
|
53
src/util.c
53
src/util.c
@ -54,7 +54,6 @@
|
||||
#include "buf.h"
|
||||
#include "util.h"
|
||||
#include "memory.h"
|
||||
#include "util-lib.c"
|
||||
|
||||
#ifndef NSIG
|
||||
# define NSIG 32
|
||||
@ -66,12 +65,52 @@
|
||||
|
||||
#define virLog(msg...) fprintf(stderr, msg)
|
||||
|
||||
#ifndef PROXY
|
||||
|
||||
#define ReportError(conn, code, fmt...) \
|
||||
virReportErrorHelper(conn, VIR_FROM_NONE, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, fmt)
|
||||
|
||||
/* Like read(), but restarts after EINTR */
|
||||
int saferead(int fd, void *buf, size_t count)
|
||||
{
|
||||
size_t nread = 0;
|
||||
while (count > 0) {
|
||||
ssize_t r = read(fd, buf, count);
|
||||
if (r < 0 && errno == EINTR)
|
||||
continue;
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0)
|
||||
return nread;
|
||||
buf = (char *)buf + r;
|
||||
count -= r;
|
||||
nread += r;
|
||||
}
|
||||
return nread;
|
||||
}
|
||||
|
||||
/* Like write(), but restarts after EINTR */
|
||||
ssize_t safewrite(int fd, const void *buf, size_t count)
|
||||
{
|
||||
size_t nwritten = 0;
|
||||
while (count > 0) {
|
||||
ssize_t r = write(fd, buf, count);
|
||||
|
||||
if (r < 0 && errno == EINTR)
|
||||
continue;
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0)
|
||||
return nwritten;
|
||||
buf = (const char *)buf + r;
|
||||
count -= r;
|
||||
nwritten += r;
|
||||
}
|
||||
return nwritten;
|
||||
}
|
||||
|
||||
#ifndef PROXY
|
||||
|
||||
int virFileStripSuffix(char *str,
|
||||
const char *suffix)
|
||||
{
|
||||
@ -675,7 +714,7 @@ static int virFileReadLimFP(FILE *fp, int maxlen, char **buf)
|
||||
}
|
||||
|
||||
/* Like virFileReadLimFP, but use a file descriptor rather than a FILE*. */
|
||||
int __virFileReadLimFD(int fd_arg, int maxlen, char **buf)
|
||||
int virFileReadLimFD(int fd_arg, int maxlen, char **buf)
|
||||
{
|
||||
int fd = dup (fd_arg);
|
||||
if (fd >= 0) {
|
||||
@ -695,7 +734,7 @@ int __virFileReadLimFD(int fd_arg, int maxlen, char **buf)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int __virFileReadAll(const char *path, int maxlen, char **buf)
|
||||
int virFileReadAll(const char *path, int maxlen, char **buf)
|
||||
{
|
||||
FILE *fh = fopen(path, "r");
|
||||
if (fh == NULL) {
|
||||
@ -985,7 +1024,7 @@ cleanup:
|
||||
validity. This function is careful to return -1 when the string S
|
||||
represents a number that is not representable as an "int". */
|
||||
int
|
||||
__virStrToLong_i(char const *s, char **end_ptr, int base, int *result)
|
||||
virStrToLong_i(char const *s, char **end_ptr, int base, int *result)
|
||||
{
|
||||
long int val;
|
||||
char *p;
|
||||
@ -1042,7 +1081,7 @@ virStrToLong_ll(char const *s, char **end_ptr, int base, long long *result)
|
||||
|
||||
/* Just like virStrToLong_i, above, but produce an "unsigned long long" value. */
|
||||
int
|
||||
__virStrToLong_ull(char const *s, char **end_ptr, int base, unsigned long long *result)
|
||||
virStrToLong_ull(char const *s, char **end_ptr, int base, unsigned long long *result)
|
||||
{
|
||||
unsigned long long val;
|
||||
char *p;
|
||||
@ -1114,7 +1153,7 @@ virParseNumber(const char **str)
|
||||
* as well as leading zeros.
|
||||
*/
|
||||
int
|
||||
__virMacAddrCompare (const char *p, const char *q)
|
||||
virMacAddrCompare (const char *p, const char *q)
|
||||
{
|
||||
unsigned char c, d;
|
||||
do {
|
||||
|
25
src/util.h
25
src/util.h
@ -25,10 +25,12 @@
|
||||
#ifndef __VIR_UTIL_H__
|
||||
#define __VIR_UTIL_H__
|
||||
|
||||
#include "util-lib.h"
|
||||
#include "verify.h"
|
||||
#include <sys/select.h>
|
||||
|
||||
int saferead(int fd, void *buf, size_t count);
|
||||
ssize_t safewrite(int fd, const void *buf, size_t count);
|
||||
|
||||
enum {
|
||||
VIR_EXEC_NONE = 0,
|
||||
VIR_EXEC_NONBLOCK = (1 << 0),
|
||||
@ -46,11 +48,9 @@ int virExec(virConnectPtr conn,
|
||||
int flags);
|
||||
int virRun(virConnectPtr conn, const char *const*argv, int *status);
|
||||
|
||||
int __virFileReadLimFD(int fd, int maxlen, char **buf);
|
||||
#define virFileReadLimFD(fd,m,b) __virFileReadLimFD((fd),(m),(b))
|
||||
int virFileReadLimFD(int fd, int maxlen, char **buf);
|
||||
|
||||
int __virFileReadAll(const char *path, int maxlen, char **buf);
|
||||
#define virFileReadAll(p,m,b) __virFileReadAll((p),(m),(b))
|
||||
int virFileReadAll(const char *path, int maxlen, char **buf);
|
||||
|
||||
int virFileMatchesNameSuffix(const char *file,
|
||||
const char *name,
|
||||
@ -90,11 +90,10 @@ int virFileDeletePid(const char *dir,
|
||||
|
||||
char *virArgvToString(const char *const *argv);
|
||||
|
||||
int __virStrToLong_i(char const *s,
|
||||
int virStrToLong_i(char const *s,
|
||||
char **end_ptr,
|
||||
int base,
|
||||
int *result);
|
||||
#define virStrToLong_i(s,e,b,r) __virStrToLong_i((s),(e),(b),(r))
|
||||
|
||||
int virStrToLong_ui(char const *s,
|
||||
char **end_ptr,
|
||||
@ -104,14 +103,12 @@ int virStrToLong_ll(char const *s,
|
||||
char **end_ptr,
|
||||
int base,
|
||||
long long *result);
|
||||
int __virStrToLong_ull(char const *s,
|
||||
char **end_ptr,
|
||||
int base,
|
||||
unsigned long long *result);
|
||||
#define virStrToLong_ull(s,e,b,r) __virStrToLong_ull((s),(e),(b),(r))
|
||||
int virStrToLong_ull(char const *s,
|
||||
char **end_ptr,
|
||||
int base,
|
||||
unsigned long long *result);
|
||||
|
||||
int __virMacAddrCompare (const char *mac1, const char *mac2);
|
||||
#define virMacAddrCompare(mac1,mac2) __virMacAddrCompare((mac1),(mac2))
|
||||
int virMacAddrCompare (const char *mac1, const char *mac2);
|
||||
|
||||
void virSkipSpaces(const char **str);
|
||||
int virParseNumber(const char **str);
|
||||
|
@ -47,7 +47,6 @@
|
||||
#include "buf.h"
|
||||
#include "console.h"
|
||||
#include "util.h"
|
||||
#include "util-lib.h"
|
||||
|
||||
static char *progname;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user