Add virLogSource variables to all source files

Any source file which calls the logging APIs now needs
to have a VIR_LOG_INIT("source.name") declaration at
the start of the file. This provides a static variable
of the virLogSource type.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2014-02-28 12:16:17 +00:00
parent 098dd79ee2
commit 2835c1e730
232 changed files with 443 additions and 34 deletions

3
cfg.mk
View File

@ -1068,3 +1068,6 @@ exclude_file_name_regexp--sc_prohibit_int_ijk = \
exclude_file_name_regexp--sc_prohibit_getenv = \ exclude_file_name_regexp--sc_prohibit_getenv = \
^tests/.*\.[ch]$$ ^tests/.*\.[ch]$$
exclude_file_name_regexp--sc_avoid_attribute_unused_in_header = \
^src/util/virlog\.h$$

View File

@ -37,6 +37,8 @@
#define VIR_FROM_THIS VIR_FROM_CONF #define VIR_FROM_THIS VIR_FROM_CONF
VIR_LOG_INIT("daemon.libvirtd-config");
/* Allocate an array of malloc'd strings from the config file, filename /* Allocate an array of malloc'd strings from the config file, filename
* (used only in diagnostics), using handle "conf". Upon error, return -1 * (used only in diagnostics), using handle "conf". Upon error, return -1
* and free any allocated memory. Otherwise, save the array in *list_arg * and free any allocated memory. Otherwise, save the array in *list_arg

View File

@ -35,6 +35,7 @@
#include "libvirt_internal.h" #include "libvirt_internal.h"
#include "virerror.h" #include "virerror.h"
#include "virfile.h" #include "virfile.h"
#include "virlog.h"
#include "virpidfile.h" #include "virpidfile.h"
#include "virprocess.h" #include "virprocess.h"
@ -105,6 +106,8 @@
#include "virdbus.h" #include "virdbus.h"
#include "cpu/cpu_map.h" #include "cpu/cpu_map.h"
VIR_LOG_INIT("daemon.libvirtd");
#if WITH_SASL #if WITH_SASL
virNetSASLContextPtr saslCtxt = NULL; virNetSASLContextPtr saslCtxt = NULL;
#endif #endif

View File

@ -32,7 +32,6 @@
# include "remote_protocol.h" # include "remote_protocol.h"
# include "lxc_protocol.h" # include "lxc_protocol.h"
# include "qemu_protocol.h" # include "qemu_protocol.h"
# include "virlog.h"
# include "virthread.h" # include "virthread.h"
# if WITH_SASL # if WITH_SASL
# include "virnetsaslcontext.h" # include "virnetsaslcontext.h"

View File

@ -57,6 +57,8 @@
#define VIR_FROM_THIS VIR_FROM_RPC #define VIR_FROM_THIS VIR_FROM_RPC
VIR_LOG_INIT("daemon.remote");
#if SIZEOF_LONG < 8 #if SIZEOF_LONG < 8
# define HYPER_TO_TYPE(_type, _to, _from) \ # define HYPER_TO_TYPE(_type, _to, _from) \
do { \ do { \

View File

@ -32,6 +32,8 @@
#define VIR_FROM_THIS VIR_FROM_STREAMS #define VIR_FROM_THIS VIR_FROM_STREAMS
VIR_LOG_INIT("daemon.stream");
struct daemonClientStream { struct daemonClientStream {
daemonClientPrivatePtr priv; daemonClientPrivatePtr priv;
int refs; int refs;

View File

@ -1446,6 +1446,24 @@ class CParser:
return token return token
def parseVirLogInit(self, token):
if token[0] != "string":
self.error("parsing VIR_LOG_INIT: expecting string", token)
token = self.token()
if token[0] != "sep":
self.error("parsing VIR_LOG_INIT: expecting ')'", token)
if token[1] != ')':
self.error("parsing VIR_LOG_INIT: expecting ')'", token)
token = self.token()
if token[0] == "sep" and token[1] == ';':
token = self.token()
return token
# #
# Parse a C definition block, used for structs or unions it parse till # Parse a C definition block, used for structs or unions it parse till
# the balancing } # the balancing }
@ -1617,6 +1635,18 @@ class CParser:
token = ("name", "virenumimpl") token = ("name", "virenumimpl")
return token return token
elif token[0] == "name" and token[1] == "VIR_LOG_INIT":
token = self.token()
if token is not None and token[0] == "sep" and token[1] == "(":
token = self.token()
token = self.parseVirLogInit(token)
else:
self.error("parsing VIR_LOG_INIT: expecting '('", token)
if token is not None:
self.lexer.push(token)
token = ("name", "virloginit")
return token
elif token[0] == "name": elif token[0] == "name":
if self.type == "": if self.type == "":
self.type = token[1] self.type = token[1]

View File

@ -29,6 +29,9 @@
#include "virstring.h" #include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_ACCESS #define VIR_FROM_THIS VIR_FROM_ACCESS
VIR_LOG_INIT("access.accessdriverpolkit");
#define virAccessError(code, ...) \ #define virAccessError(code, ...) \
virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \ virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__) __FUNCTION__, __LINE__, __VA_ARGS__)

View File

@ -33,6 +33,9 @@
#include "virlog.h" #include "virlog.h"
#define VIR_FROM_THIS VIR_FROM_ACCESS #define VIR_FROM_THIS VIR_FROM_ACCESS
VIR_LOG_INIT("access.accessmanager");
#define virAccessError(code, ...) \ #define virAccessError(code, ...) \
virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \ virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__) __FUNCTION__, __LINE__, __VA_ARGS__)

View File

@ -39,6 +39,8 @@
#define VIR_FROM_THIS VIR_FROM_BHYVE #define VIR_FROM_THIS VIR_FROM_BHYVE
VIR_LOG_INIT("bhyve.bhyve_command");
static char* static char*
virBhyveTapGetRealDeviceName(char *name) virBhyveTapGetRealDeviceName(char *name)
{ {

View File

@ -56,6 +56,8 @@
#define VIR_FROM_THIS VIR_FROM_BHYVE #define VIR_FROM_THIS VIR_FROM_BHYVE
VIR_LOG_INIT("bhyve.bhyve_driver");
bhyveConnPtr bhyve_driver = NULL; bhyveConnPtr bhyve_driver = NULL;
void void

View File

@ -44,6 +44,8 @@
#define VIR_FROM_THIS VIR_FROM_BHYVE #define VIR_FROM_THIS VIR_FROM_BHYVE
VIR_LOG_INIT("bhyve.bhyve_process");
int int
virBhyveProcessStart(virConnectPtr conn, virBhyveProcessStart(virConnectPtr conn,
bhyveConnPtr driver, bhyveConnPtr driver,

View File

@ -33,6 +33,8 @@
#include "viralloc.h" #include "viralloc.h"
#include "virstring.h" #include "virstring.h"
VIR_LOG_INIT("conf.domain_audit");
/* Return nn:mm in hex for block and character devices, and NULL /* Return nn:mm in hex for block and character devices, and NULL
* for other file types, stat failure, or allocation failure. */ * for other file types, stat failure, or allocation failure. */
#if defined major && defined minor #if defined major && defined minor

View File

@ -56,6 +56,8 @@
#define VIR_FROM_THIS VIR_FROM_DOMAIN #define VIR_FROM_THIS VIR_FROM_DOMAIN
VIR_LOG_INIT("conf.domain_conf");
/* virDomainVirtType is used to set bits in the expectedVirtTypes bitmask, /* virDomainVirtType is used to set bits in the expectedVirtTypes bitmask,
* verify that it doesn't overflow an unsigned int when shifting */ * verify that it doesn't overflow an unsigned int when shifting */
verify(VIR_DOMAIN_VIRT_LAST <= 32); verify(VIR_DOMAIN_VIRT_LAST <= 32);

View File

@ -35,6 +35,7 @@
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
VIR_LOG_INIT("util.domain_event");
static virClassPtr virDomainEventClass; static virClassPtr virDomainEventClass;
static virClassPtr virDomainEventLifecycleClass; static virClassPtr virDomainEventLifecycleClass;

View File

@ -29,6 +29,8 @@
#include "datatypes.h" #include "datatypes.h"
#include "virlog.h" #include "virlog.h"
VIR_LOG_INIT("conf.network_event");
struct _virNetworkEvent { struct _virNetworkEvent {
virObjectEvent parent; virObjectEvent parent;

View File

@ -35,6 +35,8 @@
#define VIR_FROM_THIS VIR_FROM_NWFILTER #define VIR_FROM_THIS VIR_FROM_NWFILTER
VIR_LOG_INIT("conf.nwfilter_params");
static bool isValidVarValue(const char *value); static bool isValidVarValue(const char *value);
static void virNWFilterVarAccessSetIntIterId(virNWFilterVarAccessPtr, static void virNWFilterVarAccessSetIntIterId(virNWFilterVarAccessPtr,
unsigned int); unsigned int);

View File

@ -36,6 +36,8 @@
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
VIR_LOG_INIT("conf.object_event");
struct _virObjectEventCallbackList { struct _virObjectEventCallbackList {
unsigned int nextID; unsigned int nextID;
size_t count; size_t count;

View File

@ -34,6 +34,8 @@
#define VIR_FROM_THIS VIR_FROM_SECRET #define VIR_FROM_THIS VIR_FROM_SECRET
VIR_LOG_INIT("conf.secret_conf");
VIR_ENUM_IMPL(virSecretUsageType, VIR_SECRET_USAGE_TYPE_LAST, VIR_ENUM_IMPL(virSecretUsageType, VIR_SECRET_USAGE_TYPE_LAST,
"none", "volume", "ceph", "iscsi") "none", "volume", "ceph", "iscsi")

View File

@ -50,6 +50,8 @@
#define VIR_FROM_THIS VIR_FROM_DOMAIN_SNAPSHOT #define VIR_FROM_THIS VIR_FROM_DOMAIN_SNAPSHOT
VIR_LOG_INIT("conf.snapshot_conf");
VIR_ENUM_IMPL(virDomainSnapshotLocation, VIR_DOMAIN_SNAPSHOT_LOCATION_LAST, VIR_ENUM_IMPL(virDomainSnapshotLocation, VIR_DOMAIN_SNAPSHOT_LOCATION_LAST,
"default", "default",
"no", "no",

View File

@ -44,7 +44,6 @@
#include "viralloc.h" #include "viralloc.h"
#include "virfile.h" #include "virfile.h"
#include "virstring.h" #include "virstring.h"
#include "virlog.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE #define VIR_FROM_THIS VIR_FROM_STORAGE

View File

@ -41,6 +41,8 @@
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
VIR_LOG_INIT("conf.chrdev");
/* structure holding information about character devices /* structure holding information about character devices
* open in a given domain */ * open in a given domain */
struct _virChrdevs { struct _virChrdevs {

View File

@ -40,6 +40,8 @@
#define NR_DRIVERS ARRAY_CARDINALITY(drivers) #define NR_DRIVERS ARRAY_CARDINALITY(drivers)
#define VIR_FROM_THIS VIR_FROM_CPU #define VIR_FROM_THIS VIR_FROM_CPU
VIR_LOG_INIT("cpu.cpu");
static struct cpuArchDriver *drivers[] = { static struct cpuArchDriver *drivers[] = {
&cpuDriverX86, &cpuDriverX86,
&cpuDriverPowerPC, &cpuDriverPowerPC,

View File

@ -32,6 +32,8 @@
#define VIR_FROM_THIS VIR_FROM_CPU #define VIR_FROM_THIS VIR_FROM_CPU
VIR_LOG_INIT("cpu.cpu_map");
#define CPUMAPFILE PKGDATADIR "/cpu_map.xml" #define CPUMAPFILE PKGDATADIR "/cpu_map.xml"
static char *cpumap; static char *cpumap;

View File

@ -36,6 +36,8 @@
#define VIR_FROM_THIS VIR_FROM_CPU #define VIR_FROM_THIS VIR_FROM_CPU
VIR_LOG_INIT("cpu.cpu_powerpc");
static const virArch archs[] = { VIR_ARCH_PPC64 }; static const virArch archs[] = { VIR_ARCH_PPC64 };
struct ppc_vendor { struct ppc_vendor {

View File

@ -36,6 +36,8 @@
#define VIR_FROM_THIS VIR_FROM_CPU #define VIR_FROM_THIS VIR_FROM_CPU
VIR_LOG_INIT("cpu.cpu_x86");
#define VENDOR_STRING_LENGTH 12 #define VENDOR_STRING_LENGTH 12
static const virCPUx86CPUID cpuidNull = { 0, 0, 0, 0, 0 }; static const virCPUx86CPUID cpuidNull = { 0, 0, 0, 0, 0 };

View File

@ -31,6 +31,8 @@
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
VIR_LOG_INIT("datatypes");
virClassPtr virConnectClass; virClassPtr virConnectClass;
virClassPtr virConnectCloseCallbackDataClass; virClassPtr virConnectCloseCallbackDataClass;
virClassPtr virDomainClass; virClassPtr virDomainClass;

View File

@ -31,6 +31,8 @@
#include "configmake.h" #include "configmake.h"
#include "virstring.h" #include "virstring.h"
VIR_LOG_INIT("driver");
#define DEFAULT_DRIVER_DIR LIBDIR "/libvirt/connection-driver" #define DEFAULT_DRIVER_DIR LIBDIR "/libvirt/connection-driver"
#ifdef WITH_DRIVER_MODULES #ifdef WITH_DRIVER_MODULES

View File

@ -25,7 +25,6 @@
#include "internal.h" #include "internal.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "esx_private.h" #include "esx_private.h"
#include "esx_device_monitor.h" #include "esx_device_monitor.h"

View File

@ -49,6 +49,8 @@
#define VIR_FROM_THIS VIR_FROM_ESX #define VIR_FROM_THIS VIR_FROM_ESX
VIR_LOG_INIT("esx.esx_driver");
static int esxDomainGetMaxVcpus(virDomainPtr domain); static int esxDomainGetMaxVcpus(virDomainPtr domain);
typedef struct _esxVMX_Data esxVMX_Data; typedef struct _esxVMX_Data esxVMX_Data;

View File

@ -25,7 +25,6 @@
#include "internal.h" #include "internal.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "interface_conf.h" #include "interface_conf.h"
#include "virsocketaddr.h" #include "virsocketaddr.h"

View File

@ -26,7 +26,6 @@
#include "md5.h" #include "md5.h"
#include "internal.h" #include "internal.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "network_conf.h" #include "network_conf.h"
#include "esx_private.h" #include "esx_private.h"

View File

@ -25,7 +25,6 @@
#include "internal.h" #include "internal.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "esx_private.h" #include "esx_private.h"
#include "esx_nwfilter_driver.h" #include "esx_nwfilter_driver.h"

View File

@ -24,7 +24,6 @@
#include "internal.h" #include "internal.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "esx_private.h" #include "esx_private.h"
#include "esx_secret_driver.h" #include "esx_secret_driver.h"

View File

@ -28,7 +28,6 @@
#include "internal.h" #include "internal.h"
#include "md5.h" #include "md5.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "storage_conf.h" #include "storage_conf.h"
#include "virstoragefile.h" #include "virstoragefile.h"

View File

@ -45,6 +45,8 @@
#define VIR_FROM_THIS VIR_FROM_ESX #define VIR_FROM_THIS VIR_FROM_ESX
VIR_LOG_INIT("esx.esx_storage_backend_vmfs");
/* /*
* The UUID of a storage pool is the MD5 sum of it's mount path. Therefore, * The UUID of a storage pool is the MD5 sum of it's mount path. Therefore,
* verify that UUID and MD5 sum match in size, because we rely on that. * verify that UUID and MD5 sum match in size, because we rely on that.

View File

@ -37,7 +37,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX #define VIR_FROM_THIS VIR_FROM_ESX
VIR_LOG_INIT("esx.esx_util");
int int
esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURIPtr uri) esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURIPtr uri)

View File

@ -38,7 +38,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX #define VIR_FROM_THIS VIR_FROM_ESX
VIR_LOG_INIT("esx.esx_vi");
#define ESX_VI__SOAP__RESPONSE_XPATH(_type) \ #define ESX_VI__SOAP__RESPONSE_XPATH(_type) \
((char *)"/soapenv:Envelope/soapenv:Body/" \ ((char *)"/soapenv:Envelope/soapenv:Body/" \

View File

@ -24,7 +24,6 @@
#include "virbuffer.h" #include "virbuffer.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "esx_vi_methods.h" #include "esx_vi_methods.h"
#include "esx_util.h" #include "esx_util.h"

View File

@ -36,7 +36,7 @@
#define VIR_FROM_THIS VIR_FROM_ESX #define VIR_FROM_THIS VIR_FROM_ESX
VIR_LOG_INIT("esx.esx_vi_types");
#define ESX_VI__TEMPLATE__ALLOC(__type) \ #define ESX_VI__TEMPLATE__ALLOC(__type) \
int \ int \

View File

@ -44,6 +44,8 @@
#define VIR_FROM_THIS VIR_FROM_STREAMS #define VIR_FROM_THIS VIR_FROM_STREAMS
VIR_LOG_INIT("fdstream");
/* Tunnelled migration stream support */ /* Tunnelled migration stream support */
struct virFDStreamData { struct virFDStreamData {
int fd; int fd;

View File

@ -26,7 +26,6 @@
#include "virerror.h" #include "virerror.h"
#include "datatypes.h" #include "datatypes.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "hyperv_device_monitor.h" #include "hyperv_device_monitor.h"

View File

@ -44,7 +44,7 @@
#define VIR_FROM_THIS VIR_FROM_HYPERV #define VIR_FROM_THIS VIR_FROM_HYPERV
VIR_LOG_INIT("hyperv.hyperv_driver");
static void static void
hypervFreePrivate(hypervPrivate **priv) hypervFreePrivate(hypervPrivate **priv)

View File

@ -26,7 +26,6 @@
#include "virerror.h" #include "virerror.h"
#include "datatypes.h" #include "datatypes.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "hyperv_interface_driver.h" #include "hyperv_interface_driver.h"

View File

@ -26,7 +26,6 @@
#include "virerror.h" #include "virerror.h"
#include "datatypes.h" #include "datatypes.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "hyperv_network_driver.h" #include "hyperv_network_driver.h"

View File

@ -26,7 +26,6 @@
#include "virerror.h" #include "virerror.h"
#include "datatypes.h" #include "datatypes.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "hyperv_nwfilter_driver.h" #include "hyperv_nwfilter_driver.h"

View File

@ -26,7 +26,6 @@
#include "virerror.h" #include "virerror.h"
#include "datatypes.h" #include "datatypes.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "hyperv_secret_driver.h" #include "hyperv_secret_driver.h"

View File

@ -26,7 +26,6 @@
#include "virerror.h" #include "virerror.h"
#include "datatypes.h" #include "datatypes.h"
#include "viralloc.h" #include "viralloc.h"
#include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
#include "hyperv_storage_driver.h" #include "hyperv_storage_driver.h"

View File

@ -32,7 +32,7 @@
#define VIR_FROM_THIS VIR_FROM_HYPERV #define VIR_FROM_THIS VIR_FROM_HYPERV
VIR_LOG_INIT("hyperv.hyperv_util");
int int
hypervParseUri(hypervParsedUri **parsedUri, virURIPtr uri) hypervParseUri(hypervParsedUri **parsedUri, virURIPtr uri)

View File

@ -26,7 +26,6 @@
#include "internal.h" #include "internal.h"
#include "virerror.h" #include "virerror.h"
#include "datatypes.h" #include "datatypes.h"
#include "virlog.h"
#include "viralloc.h" #include "viralloc.h"
#include "viruuid.h" #include "viruuid.h"
#include "virbuffer.h" #include "virbuffer.h"

View File

@ -36,6 +36,8 @@
#define VIR_FROM_THIS VIR_FROM_INTERFACE #define VIR_FROM_THIS VIR_FROM_INTERFACE
VIR_LOG_INIT("interface.interface_backend_netcf");
#define INTERFACE_DRIVER_NAME "netcf" #define INTERFACE_DRIVER_NAME "netcf"
/* Main driver state */ /* Main driver state */

View File

@ -39,6 +39,8 @@
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
VIR_LOG_INIT("libvirt-lxc");
/** /**
* virDomainLxcOpenNamespace: * virDomainLxcOpenNamespace:
* @domain: a domain object * @domain: a domain object

View File

@ -30,6 +30,8 @@
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
VIR_LOG_INIT("libvirt-qemu");
/** /**
* virDomainQemuMonitorCommand: * virDomainQemuMonitorCommand:
* @domain: a domain object * @domain: a domain object

View File

@ -102,6 +102,8 @@
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
VIR_LOG_INIT("libvirt");
/* /*
* TODO: * TODO:
* - use lock to protect against concurrent accesses ? * - use lock to protect against concurrent accesses ?

View File

@ -1462,7 +1462,6 @@ virLogParseOutputs;
virLogPriorityFromSyslog; virLogPriorityFromSyslog;
virLogProbablyLogMessage; virLogProbablyLogMessage;
virLogReset; virLogReset;
virLogSelf;
virLogSetBufferSize; virLogSetBufferSize;
virLogSetDefaultPriority; virLogSetDefaultPriority;
virLogSetFromEnv; virLogSetFromEnv;

View File

@ -48,6 +48,8 @@
#define VIR_FROM_THIS VIR_FROM_LIBXL #define VIR_FROM_THIS VIR_FROM_LIBXL
VIR_LOG_INIT("libxl.libxl_conf");
/* see xen-unstable.hg/xen/include/asm-x86/cpufeature.h */ /* see xen-unstable.hg/xen/include/asm-x86/cpufeature.h */
#define LIBXL_X86_FEATURE_PAE_MASK 0x40 #define LIBXL_X86_FEATURE_PAE_MASK 0x40

View File

@ -34,6 +34,7 @@
#define VIR_FROM_THIS VIR_FROM_LIBXL #define VIR_FROM_THIS VIR_FROM_LIBXL
VIR_LOG_INIT("libxl.libxl_domain");
VIR_ENUM_IMPL(libxlDomainJob, LIBXL_JOB_LAST, VIR_ENUM_IMPL(libxlDomainJob, LIBXL_JOB_LAST,
"none", "none",

View File

@ -57,6 +57,8 @@
#define VIR_FROM_THIS VIR_FROM_LIBXL #define VIR_FROM_THIS VIR_FROM_LIBXL
VIR_LOG_INIT("libxl.libxl_driver");
#define LIBXL_DOM_REQ_POWEROFF 0 #define LIBXL_DOM_REQ_POWEROFF 0
#define LIBXL_DOM_REQ_REBOOT 1 #define LIBXL_DOM_REQ_REBOOT 1
#define LIBXL_DOM_REQ_SUSPEND 2 #define LIBXL_DOM_REQ_SUSPEND 2

View File

@ -29,6 +29,8 @@
#define VIR_FROM_THIS VIR_FROM_LOCKING #define VIR_FROM_THIS VIR_FROM_LOCKING
VIR_LOG_INIT("locking.domain_lock");
static int virDomainLockManagerAddLease(virLockManagerPtr lock, static int virDomainLockManagerAddLease(virLockManagerPtr lock,
virDomainLeaseDefPtr lease) virDomainLeaseDefPtr lease)

View File

@ -54,6 +54,8 @@
#define VIR_FROM_THIS VIR_FROM_LOCKING #define VIR_FROM_THIS VIR_FROM_LOCKING
VIR_LOG_INIT("locking.lock_daemon");
#define VIR_LOCK_DAEMON_NUM_LOCKSPACES 3 #define VIR_LOCK_DAEMON_NUM_LOCKSPACES 3
struct _virLockDaemon { struct _virLockDaemon {

View File

@ -35,6 +35,8 @@
#define VIR_FROM_THIS VIR_FROM_CONF #define VIR_FROM_THIS VIR_FROM_CONF
VIR_LOG_INIT("locking.lock_daemon_config");
/* A helper function used by each of the following macros. */ /* A helper function used by each of the following macros. */
static int static int

View File

@ -28,11 +28,14 @@
#include "virstring.h" #include "virstring.h"
#include "lock_daemon.h" #include "lock_daemon.h"
#include "lock_protocol.h" #include "lock_protocol.h"
#include "lock_daemon_dispatch_stubs.h"
#include "virerror.h" #include "virerror.h"
#define VIR_FROM_THIS VIR_FROM_RPC #define VIR_FROM_THIS VIR_FROM_RPC
VIR_LOG_INIT("locking.lock_daemon_dispatch");
#include "lock_daemon_dispatch_stubs.h"
static int static int
virLockSpaceProtocolDispatchAcquireResource(virNetServerPtr server ATTRIBUTE_UNUSED, virLockSpaceProtocolDispatchAcquireResource(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientPtr client, virNetServerClientPtr client,

View File

@ -36,6 +36,8 @@
#define VIR_FROM_THIS VIR_FROM_LOCKING #define VIR_FROM_THIS VIR_FROM_LOCKING
VIR_LOG_INIT("locking.lock_driver_lockd");
#define virLockError(code, ...) \ #define virLockError(code, ...) \
virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \ virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__) __FUNCTION__, __LINE__, __VA_ARGS__)

View File

@ -26,6 +26,8 @@
#include "virlog.h" #include "virlog.h"
#include "viruuid.h" #include "viruuid.h"
VIR_LOG_INIT("locking.lock_driver_nop");
static int virLockManagerNopInit(unsigned int version ATTRIBUTE_UNUSED, static int virLockManagerNopInit(unsigned int version ATTRIBUTE_UNUSED,
const char *configFile ATTRIBUTE_UNUSED, const char *configFile ATTRIBUTE_UNUSED,

View File

@ -49,6 +49,8 @@
#define VIR_FROM_THIS VIR_FROM_LOCKING #define VIR_FROM_THIS VIR_FROM_LOCKING
VIR_LOG_INIT("locking.lock_driver_sanlock");
#define VIR_LOCK_MANAGER_SANLOCK_AUTO_DISK_LOCKSPACE "__LIBVIRT__DISKS__" #define VIR_LOCK_MANAGER_SANLOCK_AUTO_DISK_LOCKSPACE "__LIBVIRT__DISKS__"
#define VIR_LOCK_MANAGER_SANLOCK_KILLPATH LIBEXECDIR "/libvirt_sanlock_helper" #define VIR_LOCK_MANAGER_SANLOCK_KILLPATH LIBEXECDIR "/libvirt_sanlock_helper"

View File

@ -39,6 +39,8 @@
#define VIR_FROM_THIS VIR_FROM_LOCKING #define VIR_FROM_THIS VIR_FROM_LOCKING
VIR_LOG_INIT("locking.lock_manager");
#define CHECK_DRIVER(field, errret) \ #define CHECK_DRIVER(field, errret) \
if (!driver->field) { \ if (!driver->field) { \
virReportError(VIR_ERR_INTERNAL_ERROR, \ virReportError(VIR_ERR_INTERNAL_ERROR, \

View File

@ -32,6 +32,8 @@
#define VIR_FROM_THIS VIR_FROM_LXC #define VIR_FROM_THIS VIR_FROM_LXC
VIR_LOG_INIT("lxc.lxc_cgroup");
static int virLXCCgroupSetupCpuTune(virDomainDefPtr def, static int virLXCCgroupSetupCpuTune(virDomainDefPtr def,
virCgroupPtr cgroup) virCgroupPtr cgroup)
{ {

View File

@ -41,6 +41,8 @@
#define VIR_FROM_THIS VIR_FROM_LXC #define VIR_FROM_THIS VIR_FROM_LXC
VIR_LOG_INIT("lxc.lxc_conf");
static virClassPtr virLXCDriverConfigClass; static virClassPtr virLXCDriverConfigClass;
static void virLXCDriverConfigDispose(void *obj); static void virLXCDriverConfigDispose(void *obj);

View File

@ -71,6 +71,8 @@
#define VIR_FROM_THIS VIR_FROM_LXC #define VIR_FROM_THIS VIR_FROM_LXC
VIR_LOG_INIT("lxc.lxc_container");
/* /*
* GLibc headers are behind the kernel, so we define these * GLibc headers are behind the kernel, so we define these
* constants if they're not present already. * constants if they're not present already.

View File

@ -70,6 +70,8 @@
#define VIR_FROM_THIS VIR_FROM_LXC #define VIR_FROM_THIS VIR_FROM_LXC
VIR_LOG_INIT("lxc.lxc_controller");
typedef struct _virLXCControllerConsole virLXCControllerConsole; typedef struct _virLXCControllerConsole virLXCControllerConsole;
typedef virLXCControllerConsole *virLXCControllerConsolePtr; typedef virLXCControllerConsole *virLXCControllerConsolePtr;
struct _virLXCControllerConsole { struct _virLXCControllerConsole {

View File

@ -29,6 +29,8 @@
#define VIR_FROM_THIS VIR_FROM_LXC #define VIR_FROM_THIS VIR_FROM_LXC
VIR_LOG_INIT("lxc.lxc_domain");
static void *virLXCDomainObjPrivateAlloc(void) static void *virLXCDomainObjPrivateAlloc(void)
{ {
virLXCDomainObjPrivatePtr priv; virLXCDomainObjPrivatePtr priv;

View File

@ -75,6 +75,7 @@
#define VIR_FROM_THIS VIR_FROM_LXC #define VIR_FROM_THIS VIR_FROM_LXC
VIR_LOG_INIT("lxc.lxc_driver");
#define LXC_NB_MEM_PARAM 3 #define LXC_NB_MEM_PARAM 3
#define LXC_NB_DOMAIN_BLOCK_STAT_PARAM 4 #define LXC_NB_DOMAIN_BLOCK_STAT_PARAM 4

View File

@ -32,7 +32,6 @@
#include "lxc_fuse.h" #include "lxc_fuse.h"
#include "lxc_cgroup.h" #include "lxc_cgroup.h"
#include "virerror.h" #include "virerror.h"
#include "virlog.h"
#include "virfile.h" #include "virfile.h"
#include "virbuffer.h" #include "virbuffer.h"
#include "virstring.h" #include "virstring.h"

View File

@ -31,6 +31,8 @@
#define VIR_FROM_THIS VIR_FROM_LXC #define VIR_FROM_THIS VIR_FROM_LXC
VIR_LOG_INIT("lxc.lxc_hostdev");
int int
virLXCUpdateActiveUsbHostdevs(virLXCDriverPtr driver, virLXCUpdateActiveUsbHostdevs(virLXCDriverPtr driver,
virDomainDefPtr def) virDomainDefPtr def)

View File

@ -34,6 +34,8 @@
#define VIR_FROM_THIS VIR_FROM_LXC #define VIR_FROM_THIS VIR_FROM_LXC
VIR_LOG_INIT("lxc.lxc_monitor");
struct _virLXCMonitor { struct _virLXCMonitor {
virObjectLockable parent; virObjectLockable parent;

View File

@ -34,6 +34,7 @@
#define VIR_FROM_THIS VIR_FROM_LXC #define VIR_FROM_THIS VIR_FROM_LXC
VIR_LOG_INIT("lxc.lxc_native");
static virDomainFSDefPtr static virDomainFSDefPtr
lxcCreateFSDef(int type, lxcCreateFSDef(int type,

View File

@ -54,6 +54,8 @@
#define VIR_FROM_THIS VIR_FROM_LXC #define VIR_FROM_THIS VIR_FROM_LXC
VIR_LOG_INIT("lxc.lxc_process");
#define START_POSTFIX ": starting up\n" #define START_POSTFIX ": starting up\n"
static virDomainObjPtr static virDomainObjPtr

View File

@ -75,6 +75,8 @@
#define VIR_FROM_THIS VIR_FROM_NETWORK #define VIR_FROM_THIS VIR_FROM_NETWORK
VIR_LOG_INIT("network.bridge_driver");
static void networkDriverLock(virNetworkDriverStatePtr driver) static void networkDriverLock(virNetworkDriverStatePtr driver)
{ {
virMutexLock(&driver->lock); virMutexLock(&driver->lock);

View File

@ -27,9 +27,12 @@
#include "virfile.h" #include "virfile.h"
#include "viriptables.h" #include "viriptables.h"
#include "virstring.h" #include "virstring.h"
#include "virlog.h"
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
VIR_LOG_INIT("network.bridge_driver_linux");
#define PROC_NET_ROUTE "/proc/net/route" #define PROC_NET_ROUTE "/proc/net/route"
/* XXX: This function can be a lot more exhaustive, there are certainly /* XXX: This function can be a lot more exhaustive, there are certainly

View File

@ -25,7 +25,6 @@
# define __VIR_BRIDGE_DRIVER_PLATFORM_H__ # define __VIR_BRIDGE_DRIVER_PLATFORM_H__
# include "internal.h" # include "internal.h"
# include "virlog.h"
# include "virthread.h" # include "virthread.h"
# include "virdnsmasq.h" # include "virdnsmasq.h"
# include "network_conf.h" # include "network_conf.h"

View File

@ -33,7 +33,6 @@
#include "datatypes.h" #include "datatypes.h"
#include "viralloc.h" #include "viralloc.h"
#include "virfile.h" #include "virfile.h"
#include "virlog.h"
#include "virstring.h" #include "virstring.h"
#include "node_device_conf.h" #include "node_device_conf.h"
#include "node_device_hal.h" #include "node_device_hal.h"
@ -43,7 +42,6 @@
#define VIR_FROM_THIS VIR_FROM_NODEDEV #define VIR_FROM_THIS VIR_FROM_NODEDEV
static int update_caps(virNodeDeviceObjPtr dev) static int update_caps(virNodeDeviceObjPtr dev)
{ {
virNodeDevCapsDefPtr cap = dev->def->caps; virNodeDevCapsDefPtr cap = dev->def->caps;

View File

@ -43,6 +43,8 @@
#define VIR_FROM_THIS VIR_FROM_NODEDEV #define VIR_FROM_THIS VIR_FROM_NODEDEV
VIR_LOG_INIT("node_device.node_device_hal");
/* /*
* Host device enumeration (HAL implementation) * Host device enumeration (HAL implementation)
*/ */

View File

@ -38,6 +38,8 @@
#ifdef __linux__ #ifdef __linux__
VIR_LOG_INIT("node_device.node_device_linux_sysfs");
int int
detect_scsi_host_caps(union _virNodeDevCapData *d) detect_scsi_host_caps(union _virNodeDevCapData *d)
{ {

View File

@ -43,6 +43,8 @@
#define VIR_FROM_THIS VIR_FROM_NODEDEV #define VIR_FROM_THIS VIR_FROM_NODEDEV
VIR_LOG_INIT("node_device.node_device_udev");
#ifndef TYPE_RAID #ifndef TYPE_RAID
# define TYPE_RAID 12 # define TYPE_RAID 12
#endif #endif

View File

@ -44,7 +44,6 @@
#include "viralloc.h" #include "viralloc.h"
#include "nodeinfopriv.h" #include "nodeinfopriv.h"
#include "physmem.h" #include "physmem.h"
#include "virlog.h"
#include "virerror.h" #include "virerror.h"
#include "count-one-bits.h" #include "count-one-bits.h"
#include "intprops.h" #include "intprops.h"

View File

@ -72,6 +72,8 @@
#define VIR_FROM_THIS VIR_FROM_NWFILTER #define VIR_FROM_THIS VIR_FROM_NWFILTER
VIR_LOG_INIT("nwfilter.nwfilter_dhcpsnoop");
#ifdef HAVE_LIBPCAP #ifdef HAVE_LIBPCAP
# define LEASEFILE_DIR LOCALSTATEDIR "/run/libvirt/network/" # define LEASEFILE_DIR LOCALSTATEDIR "/run/libvirt/network/"

View File

@ -50,6 +50,8 @@
#define VIR_FROM_THIS VIR_FROM_NWFILTER #define VIR_FROM_THIS VIR_FROM_NWFILTER
VIR_LOG_INIT("nwfilter.nwfilter_driver");
#define DBUS_RULE_FWD_NAMEOWNERCHANGED \ #define DBUS_RULE_FWD_NAMEOWNERCHANGED \
"type='signal'" \ "type='signal'" \
",interface='"DBUS_INTERFACE_DBUS"'" \ ",interface='"DBUS_INTERFACE_DBUS"'" \

View File

@ -48,6 +48,8 @@
#define VIR_FROM_THIS VIR_FROM_NWFILTER #define VIR_FROM_THIS VIR_FROM_NWFILTER
VIR_LOG_INIT("nwfilter.nwfilter_ebiptables_driver");
#define EBTABLES_CHAIN_INCOMING "PREROUTING" #define EBTABLES_CHAIN_INCOMING "PREROUTING"
#define EBTABLES_CHAIN_OUTGOING "POSTROUTING" #define EBTABLES_CHAIN_OUTGOING "POSTROUTING"

View File

@ -41,6 +41,7 @@
#define VIR_FROM_THIS VIR_FROM_NWFILTER #define VIR_FROM_THIS VIR_FROM_NWFILTER
VIR_LOG_INIT("nwfilter.nwfilter_gentech_driver");
#define NWFILTER_STD_VAR_MAC NWFILTER_VARNAME_MAC #define NWFILTER_STD_VAR_MAC NWFILTER_VARNAME_MAC
#define NWFILTER_STD_VAR_IP NWFILTER_VARNAME_IP #define NWFILTER_STD_VAR_IP NWFILTER_VARNAME_IP

View File

@ -58,6 +58,8 @@
#define VIR_FROM_THIS VIR_FROM_NWFILTER #define VIR_FROM_THIS VIR_FROM_NWFILTER
VIR_LOG_INIT("nwfilter.nwfilter_learnipaddr");
#define IFINDEX2STR(VARNAME, ifindex) \ #define IFINDEX2STR(VARNAME, ifindex) \
char VARNAME[INT_BUFSIZE_BOUND(ifindex)]; \ char VARNAME[INT_BUFSIZE_BOUND(ifindex)]; \
snprintf(VARNAME, sizeof(VARNAME), "%d", ifindex); snprintf(VARNAME, sizeof(VARNAME), "%d", ifindex);

View File

@ -61,6 +61,8 @@
#define VIR_FROM_THIS VIR_FROM_OPENVZ #define VIR_FROM_THIS VIR_FROM_OPENVZ
VIR_LOG_INIT("openvz.openvz_driver");
#define OPENVZ_MAX_ARG 28 #define OPENVZ_MAX_ARG 28
#define CMDBUF_LEN 1488 #define CMDBUF_LEN 1488
#define CMDOP_LEN 288 #define CMDOP_LEN 288

View File

@ -56,6 +56,8 @@
#define VIR_FROM_THIS VIR_FROM_PARALLELS #define VIR_FROM_THIS VIR_FROM_PARALLELS
VIR_LOG_INIT("parallels.parallels_driver");
#define PRLCTL "prlctl" #define PRLCTL "prlctl"
#define PRLSRVCTL "prlsrvctl" #define PRLSRVCTL "prlsrvctl"

View File

@ -61,6 +61,9 @@
#define VIR_FROM_THIS VIR_FROM_PHYP #define VIR_FROM_THIS VIR_FROM_PHYP
VIR_LOG_INIT("phyp.phyp_driver");
/* /*
* URI: phyp://user@[hmc|ivm]/managed_system * URI: phyp://user@[hmc|ivm]/managed_system
* */ * */

View File

@ -45,6 +45,8 @@
#define VIR_FROM_THIS VIR_FROM_QEMU #define VIR_FROM_THIS VIR_FROM_QEMU
VIR_LOG_INIT("qemu.qemu_agent");
#define LINE_ENDING "\n" #define LINE_ENDING "\n"
#define DEBUG_IO 0 #define DEBUG_IO 0

View File

@ -48,6 +48,8 @@
#define VIR_FROM_THIS VIR_FROM_QEMU #define VIR_FROM_THIS VIR_FROM_QEMU
VIR_LOG_INIT("qemu.qemu_capabilities");
/* While not public, these strings must not change. They /* While not public, these strings must not change. They
* are used in domain status files which are read on * are used in domain status files which are read on
* daemon restarts * daemon restarts

View File

@ -37,6 +37,8 @@
#define VIR_FROM_THIS VIR_FROM_QEMU #define VIR_FROM_THIS VIR_FROM_QEMU
VIR_LOG_INIT("qemu.qemu_cgroup");
static const char *const defaultDeviceACL[] = { static const char *const defaultDeviceACL[] = {
"/dev/null", "/dev/full", "/dev/zero", "/dev/null", "/dev/full", "/dev/zero",
"/dev/random", "/dev/urandom", "/dev/random", "/dev/urandom",

View File

@ -59,6 +59,8 @@
#define VIR_FROM_THIS VIR_FROM_QEMU #define VIR_FROM_THIS VIR_FROM_QEMU
VIR_LOG_INIT("qemu.qemu_command");
#define VIO_ADDR_NET 0x1000ul #define VIO_ADDR_NET 0x1000ul
#define VIO_ADDR_SCSI 0x2000ul #define VIO_ADDR_SCSI 0x2000ul
#define VIO_ADDR_SERIAL 0x30000000ul #define VIO_ADDR_SERIAL 0x30000000ul

View File

@ -56,6 +56,8 @@
#define VIR_FROM_THIS VIR_FROM_QEMU #define VIR_FROM_THIS VIR_FROM_QEMU
VIR_LOG_INIT("qemu.qemu_conf");
static virClassPtr virQEMUDriverConfigClass; static virClassPtr virQEMUDriverConfigClass;
static void virQEMUDriverConfigDispose(void *obj); static void virQEMUDriverConfigDispose(void *obj);

View File

@ -46,6 +46,8 @@
#define VIR_FROM_THIS VIR_FROM_QEMU #define VIR_FROM_THIS VIR_FROM_QEMU
VIR_LOG_INIT("qemu.qemu_domain");
#define QEMU_NAMESPACE_HREF "http://libvirt.org/schemas/domain/qemu/1.0" #define QEMU_NAMESPACE_HREF "http://libvirt.org/schemas/domain/qemu/1.0"
VIR_ENUM_IMPL(qemuDomainJob, QEMU_JOB_LAST, VIR_ENUM_IMPL(qemuDomainJob, QEMU_JOB_LAST,

View File

@ -98,6 +98,8 @@
#define VIR_FROM_THIS VIR_FROM_QEMU #define VIR_FROM_THIS VIR_FROM_QEMU
VIR_LOG_INIT("qemu.qemu_driver");
#define QEMU_NB_MEM_PARAM 3 #define QEMU_NB_MEM_PARAM 3
#define QEMU_NB_BLOCK_IO_TUNE_PARAM 6 #define QEMU_NB_BLOCK_IO_TUNE_PARAM 6

Some files were not shown because too many files have changed in this diff Show More