mirror of https://gitee.com/openkylin/libvirt.git
lib: Use G_NO_INLINE instead of G_GNUC_NO_INLINE
The G_GNUC_NO_INLINE macro will eventually be marked as
deprecated [1] and we are recommended to use G_NO_INLINE instead.
Do the switch now, rather than waiting for compile time warning
to occur.
1: 15cd0f0461
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
b9e3ab53e5
commit
9e8601c464
|
@ -628,7 +628,7 @@ analysis tools understand the code better:
|
|||
``G_GNUC_FALLTHROUGH``
|
||||
allow code reuse by multiple switch cases
|
||||
|
||||
``G_GNUC_NO_INLINE``
|
||||
``G_NO_INLINE``
|
||||
the function is mocked in the test suite
|
||||
|
||||
``G_GNUC_NORETURN``
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#define G_GNUC_UNUSED
|
||||
#define G_GNUC_NULL_TERMINATED
|
||||
#define G_GNUC_NORETURN
|
||||
#define G_GNUC_NO_INLINE
|
||||
#define G_NO_INLINE
|
||||
#define G_GNUC_FALLTHROUGH
|
||||
#define G_GNUC_PRINTF(a, b)
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ def scan_annotations(filename):
|
|||
elif line.isspace():
|
||||
func = None
|
||||
|
||||
if "G_GNUC_NO_INLINE" in line:
|
||||
if "G_NO_INLINE" in line:
|
||||
if func is not None:
|
||||
noninlined[func] = True
|
||||
|
||||
|
@ -73,7 +73,7 @@ warned = False
|
|||
for func in mocked.keys():
|
||||
if func not in noninlined:
|
||||
warned = True
|
||||
print("%s is mocked at %s but missing 'G_GNUC_NO_INLINE' annotation" %
|
||||
print("%s is mocked at %s but missing 'G_NO_INLINE' annotation" %
|
||||
(func, mocked[func]), file=sys.stderr)
|
||||
|
||||
if warned:
|
||||
|
|
|
@ -212,7 +212,7 @@ virCPUGetHost(virArch arch,
|
|||
virDomainCapsCPUModels *models);
|
||||
|
||||
virCPUDef *
|
||||
virCPUProbeHost(virArch arch) G_GNUC_NO_INLINE;
|
||||
virCPUProbeHost(virArch arch) G_NO_INLINE;
|
||||
|
||||
virCPUDef *
|
||||
virCPUBaseline(virArch arch,
|
||||
|
|
|
@ -47,4 +47,4 @@ libxlMakeDomainCapabilities(virDomainCaps *domCaps,
|
|||
|
||||
int
|
||||
libxlDomainGetEmulatorType(const virDomainDef *def)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
|
|
@ -845,7 +845,7 @@ virSEVCapability *
|
|||
virQEMUCapsGetSEVCapabilities(virQEMUCaps *qemuCaps);
|
||||
|
||||
bool
|
||||
virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps) G_GNUC_NO_INLINE;
|
||||
virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps) G_NO_INLINE;
|
||||
|
||||
virArch virQEMUCapsArchFromString(const char *arch);
|
||||
const char *virQEMUCapsArchToString(virArch arch);
|
||||
|
|
|
@ -85,7 +85,7 @@ virQEMUCapsGetCPUModelX86Data(virQEMUCaps *qemuCaps,
|
|||
|
||||
virCPUDef *
|
||||
virQEMUCapsProbeHostCPU(virArch hostArch,
|
||||
virDomainCapsCPUModels *models) G_GNUC_NO_INLINE;
|
||||
virDomainCapsCPUModels *models) G_NO_INLINE;
|
||||
|
||||
void
|
||||
virQEMUCapsSetGICCapabilities(virQEMUCaps *qemuCaps,
|
||||
|
|
|
@ -67,7 +67,7 @@ int qemuBuildTLSx509BackendProps(const char *tlspath,
|
|||
|
||||
/* Open a UNIX socket for chardev FD passing */
|
||||
int
|
||||
qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev) G_GNUC_NO_INLINE;
|
||||
qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev) G_NO_INLINE;
|
||||
|
||||
virJSONValue *
|
||||
qemuBuildChrDeviceProps(const virDomainDef *vmdef,
|
||||
|
@ -238,7 +238,7 @@ int
|
|||
qemuBuildTPMOpenBackendFDs(const char *tpmdev,
|
||||
int *tpmfd,
|
||||
int *cancelfd)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) G_GNUC_NO_INLINE;
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) G_NO_INLINE;
|
||||
|
||||
const char * qemuAudioDriverTypeToString(virDomainAudioType type);
|
||||
virDomainAudioType qemuAudioDriverTypeFromString(const char *str);
|
||||
|
|
|
@ -5281,7 +5281,7 @@ qemuDomainResetDeviceRemoval(virDomainObj *vm)
|
|||
}
|
||||
|
||||
|
||||
unsigned long long G_GNUC_NO_INLINE
|
||||
unsigned long long G_NO_INLINE
|
||||
qemuDomainGetUnplugTimeout(virDomainObj *vm)
|
||||
{
|
||||
if (qemuDomainIsPSeries(vm->def))
|
||||
|
|
|
@ -159,7 +159,7 @@ int qemuDomainSetVcpuInternal(virQEMUDriver *driver,
|
|||
virBitmap *vcpus,
|
||||
bool state);
|
||||
|
||||
unsigned long long qemuDomainGetUnplugTimeout(virDomainObj *vm) G_GNUC_NO_INLINE;
|
||||
unsigned long long qemuDomainGetUnplugTimeout(virDomainObj *vm) G_NO_INLINE;
|
||||
|
||||
int qemuHotplugAttachDBusVMState(virQEMUDriver *driver,
|
||||
virDomainObj *vm,
|
||||
|
|
|
@ -51,9 +51,9 @@ int qemuInterfaceBridgeConnect(virDomainDef *def,
|
|||
ATTRIBUTE_NONNULL(2);
|
||||
|
||||
int qemuInterfaceOpenVhostNet(virDomainObj *def,
|
||||
virDomainNetDef *net) G_GNUC_NO_INLINE;
|
||||
virDomainNetDef *net) G_NO_INLINE;
|
||||
|
||||
int qemuInterfacePrepareSlirp(virQEMUDriver *driver,
|
||||
virDomainNetDef *net);
|
||||
|
||||
int qemuInterfaceVDPAConnect(virDomainNetDef *net) G_GNUC_NO_INLINE;
|
||||
int qemuInterfaceVDPAConnect(virDomainNetDef *net) G_NO_INLINE;
|
||||
|
|
|
@ -435,7 +435,7 @@ int qemuMonitorSetLink(qemuMonitor *mon,
|
|||
/* These APIs are for use by the internal Text/JSON monitor impl code only */
|
||||
char *qemuMonitorNextCommandID(qemuMonitor *mon);
|
||||
int qemuMonitorSend(qemuMonitor *mon,
|
||||
qemuMonitorMessage *msg) G_GNUC_NO_INLINE;
|
||||
qemuMonitorMessage *msg) G_NO_INLINE;
|
||||
int qemuMonitorUpdateVideoMemorySize(qemuMonitor *mon,
|
||||
virDomainVideoDef *video,
|
||||
const char *videoName)
|
||||
|
|
|
@ -31,7 +31,7 @@ int
|
|||
qemuMonitorJSONIOProcessLine(qemuMonitor *mon,
|
||||
const char *line,
|
||||
qemuMonitorMessage *msg)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
int
|
||||
qemuMonitorJSONIOProcess(qemuMonitor *mon,
|
||||
|
|
|
@ -101,4 +101,4 @@ qemuMonitorIOWriteWithFD(qemuMonitor *mon,
|
|||
const char *data,
|
||||
size_t len,
|
||||
int fd)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
|
|
@ -117,7 +117,7 @@ int qemuProcessPrepareHostHostdev(virDomainHostdevDef *hostdev);
|
|||
|
||||
int qemuProcessPrepareHostBackendChardevHotplug(virDomainObj *vm,
|
||||
virDomainDeviceDef *dev)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
|
||||
int qemuProcessPrepareHost(virQEMUDriver *driver,
|
||||
|
@ -205,9 +205,9 @@ int qemuProcessRefreshDisks(virQEMUDriver *driver,
|
|||
virDomainObj *vm,
|
||||
virDomainAsyncJob asyncJob);
|
||||
|
||||
int qemuProcessStartManagedPRDaemon(virDomainObj *vm) G_GNUC_NO_INLINE;
|
||||
int qemuProcessStartManagedPRDaemon(virDomainObj *vm) G_NO_INLINE;
|
||||
|
||||
void qemuProcessKillManagedPRDaemon(virDomainObj *vm) G_GNUC_NO_INLINE;
|
||||
void qemuProcessKillManagedPRDaemon(virDomainObj *vm) G_NO_INLINE;
|
||||
|
||||
typedef struct _qemuProcessQMP qemuProcessQMP;
|
||||
struct _qemuProcessQMP {
|
||||
|
|
|
@ -132,10 +132,10 @@ int virNetSocketGetUNIXIdentity(virNetSocket *sock,
|
|||
gid_t *gid,
|
||||
pid_t *pid,
|
||||
unsigned long long *timestamp)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
int virNetSocketGetSELinuxContext(virNetSocket *sock,
|
||||
char **context)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
int virNetSocketSetBlocking(virNetSocket *sock,
|
||||
bool blocking);
|
||||
|
|
|
@ -95,11 +95,23 @@ char *vir_g_strdup_vprintf(const char *msg, va_list args)
|
|||
|
||||
void vir_g_source_unref(GSource *src, GMainContext *ctx);
|
||||
|
||||
/* Intentionally redefine macro so that it's not marked as available in 2.58
|
||||
* and newer. Drop when bumping to 2.58 or newer. */
|
||||
#undef G_GNUC_NO_INLINE
|
||||
#if g_macro__has_attribute(__noinline__)
|
||||
# define G_GNUC_NO_INLINE __attribute__ ((__noinline__))
|
||||
#else
|
||||
# define G_GNUC_NO_INLINE
|
||||
#endif
|
||||
#if !GLIB_CHECK_VERSION(2, 73, 2)
|
||||
# if (defined(__has_attribute) && __has_attribute(__noinline__)) || G_GNUC_CHECK_VERSION (2, 96)
|
||||
# if defined (__cplusplus) && __cplusplus >= 201103L
|
||||
/* Use ISO C++11 syntax when the compiler supports it. */
|
||||
# define G_NO_INLINE [[gnu::noinline]]
|
||||
# else
|
||||
# define G_NO_INLINE __attribute__ ((__noinline__))
|
||||
# endif
|
||||
# elif defined (_MSC_VER) && (1200 <= _MSC_VER)
|
||||
/* Use MSVC specific syntax. */
|
||||
# if defined (__cplusplus) && __cplusplus >= 201103L
|
||||
/* Use ISO C++11 syntax when the compiler supports it. */
|
||||
# define G_NO_INLINE [[msvc::noinline]]
|
||||
# else
|
||||
# define G_NO_INLINE __declspec (noinline)
|
||||
# endif
|
||||
# else
|
||||
# define G_NO_INLINE /* empty */
|
||||
# endif
|
||||
#endif /* GLIB_CHECK_VERSION(2, 73, 0) */
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
bool
|
||||
virCgroupV2DevicesAvailable(virCgroup *group)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
int
|
||||
virCgroupV2DevicesDetectProg(virCgroup *group);
|
||||
|
|
|
@ -54,7 +54,7 @@ typedef enum {
|
|||
|
||||
void virCommandPassFD(virCommand *cmd,
|
||||
int fd,
|
||||
unsigned int flags) G_GNUC_NO_INLINE;
|
||||
unsigned int flags) G_NO_INLINE;
|
||||
|
||||
void virCommandSetPidFile(virCommand *cmd,
|
||||
const char *pidfile) ATTRIBUTE_NONNULL(2);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
int
|
||||
virDevMapperGetTargets(const char *path,
|
||||
GSList **devPaths) G_GNUC_NO_INLINE;
|
||||
GSList **devPaths) G_NO_INLINE;
|
||||
|
||||
bool
|
||||
virIsDevMapperDevice(const char *dev_name) ATTRIBUTE_NONNULL(1);
|
||||
|
|
|
@ -119,9 +119,9 @@ int virFileWrapperFdClose(virFileWrapperFd *dfd);
|
|||
void virFileWrapperFdFree(virFileWrapperFd *dfd);
|
||||
|
||||
int virFileLock(int fd, bool shared, off_t start, off_t len, bool waitForLock)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
int virFileUnlock(int fd, off_t start, off_t len)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
typedef int (*virFileRewriteFunc)(int fd,
|
||||
const char *path,
|
||||
|
@ -188,7 +188,7 @@ int virFileIsLink(const char *linkpath)
|
|||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
|
||||
|
||||
char *virFindFileInPath(const char *file)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
char *virFileFindResource(const char *filename,
|
||||
const char *builddir,
|
||||
|
@ -207,7 +207,7 @@ void virFileActivateDirOverrideForLib(void);
|
|||
|
||||
off_t virFileLength(const char *path, int fd) ATTRIBUTE_NONNULL(1);
|
||||
bool virFileIsDir (const char *file) ATTRIBUTE_NONNULL(1);
|
||||
bool virFileExists(const char *file) ATTRIBUTE_NONNULL(1) G_GNUC_NO_INLINE;
|
||||
bool virFileExists(const char *file) ATTRIBUTE_NONNULL(1) G_NO_INLINE;
|
||||
bool virFileIsExecutable(const char *file) ATTRIBUTE_NONNULL(1);
|
||||
bool virFileIsRegular(const char *file) ATTRIBUTE_NONNULL(1);
|
||||
|
||||
|
@ -241,7 +241,7 @@ int virFileGetMountReverseSubtree(const char *mtabpath,
|
|||
size_t *nmountsret) G_GNUC_WARN_UNUSED_RESULT;
|
||||
|
||||
char *virFileSanitizePath(const char *path);
|
||||
char *virFileCanonicalizePath(const char *path) G_GNUC_NO_INLINE;
|
||||
char *virFileCanonicalizePath(const char *path) G_NO_INLINE;
|
||||
|
||||
enum {
|
||||
VIR_FILE_OPEN_NONE = 0,
|
||||
|
@ -363,21 +363,21 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(virFileWrapperFd, virFileWrapperFdFree);
|
|||
int virFileGetXAttr(const char *path,
|
||||
const char *name,
|
||||
char **value)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
int virFileGetXAttrQuiet(const char *path,
|
||||
const char *name,
|
||||
char **value)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
int virFileSetXAttr(const char *path,
|
||||
const char *name,
|
||||
const char *value)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
int virFileRemoveXAttr(const char *path,
|
||||
const char *name)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
int virFileDataSync(int fd);
|
||||
|
||||
|
|
|
@ -30,4 +30,4 @@
|
|||
#include "internal.h"
|
||||
|
||||
uint32_t virHashCodeGen(const void *key, size_t len, uint32_t seed)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
|
|
@ -45,7 +45,7 @@ virBitmap *virHostCPUGetOnlineBitmap(void);
|
|||
virBitmap *virHostCPUGetAvailableCPUsBitmap(void);
|
||||
|
||||
int virHostCPUGetCount(void);
|
||||
int virHostCPUGetThreadsPerSubcore(virArch arch) G_GNUC_NO_INLINE;
|
||||
int virHostCPUGetThreadsPerSubcore(virArch arch) G_NO_INLINE;
|
||||
|
||||
int virHostCPUGetMap(unsigned char **cpumap,
|
||||
unsigned int *online,
|
||||
|
@ -58,7 +58,7 @@ int virHostCPUGetInfo(virArch hostarch,
|
|||
unsigned int *cores,
|
||||
unsigned int *threads);
|
||||
|
||||
int virHostCPUGetKVMMaxVCPUs(void) G_GNUC_NO_INLINE;
|
||||
int virHostCPUGetKVMMaxVCPUs(void) G_NO_INLINE;
|
||||
|
||||
int virHostCPUStatsAssign(virNodeCPUStatsPtr param,
|
||||
const char *name,
|
||||
|
@ -75,7 +75,7 @@ virBitmap *virHostCPUGetSiblingsList(unsigned int cpu);
|
|||
int virHostCPUGetOnline(unsigned int cpu, bool *online);
|
||||
|
||||
unsigned int
|
||||
virHostCPUGetMicrocodeVersion(virArch hostArch) G_GNUC_NO_INLINE;
|
||||
virHostCPUGetMicrocodeVersion(virArch hostArch) G_NO_INLINE;
|
||||
|
||||
int virHostCPUGetMSR(unsigned long index,
|
||||
uint64_t *msr);
|
||||
|
|
|
@ -57,4 +57,4 @@ int virHostMemAllocPages(unsigned int npages,
|
|||
bool add);
|
||||
|
||||
int virHostMemGetTHPSize(unsigned long long *size)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
int
|
||||
virHostGetBootTime(unsigned long long *when)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
int
|
||||
virHostBootTimeInit(void);
|
||||
|
|
|
@ -27,4 +27,4 @@
|
|||
#include "viridentity.h"
|
||||
|
||||
char *
|
||||
virIdentityEnsureSystemToken(void) G_GNUC_NO_INLINE;
|
||||
virIdentityEnsureSystemToken(void) G_NO_INLINE;
|
||||
|
|
|
@ -49,7 +49,7 @@ void virMacAddrGetRaw(const virMacAddr *src, unsigned char dst[VIR_MAC_BUFLEN]);
|
|||
const char *virMacAddrFormat(const virMacAddr *addr,
|
||||
char *str);
|
||||
void virMacAddrGenerate(const unsigned char prefix[VIR_MAC_PREFIX_BUFLEN],
|
||||
virMacAddr *addr) G_GNUC_NO_INLINE;
|
||||
virMacAddr *addr) G_NO_INLINE;
|
||||
int virMacAddrParse(const char* str,
|
||||
virMacAddr *addr) G_GNUC_WARN_UNUSED_RESULT;
|
||||
int virMacAddrParseHex(const char* str,
|
||||
|
|
|
@ -168,11 +168,11 @@ int virNetDevSetupControl(const char *ifname,
|
|||
G_GNUC_WARN_UNUSED_RESULT;
|
||||
|
||||
int virNetDevExists(const char *brname)
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
||||
|
||||
int virNetDevSetOnline(const char *ifname,
|
||||
bool online)
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
||||
int virNetDevGetOnline(const char *ifname,
|
||||
bool *online)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
||||
|
@ -180,7 +180,7 @@ int virNetDevGetOnline(const char *ifname,
|
|||
|
||||
int virNetDevSetMAC(const char *ifname,
|
||||
const virMacAddr *macaddr)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
||||
int virNetDevGetMAC(const char *ifname,
|
||||
virMacAddr *macaddr)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
||||
|
@ -324,10 +324,10 @@ int virNetDevSysfsFile(char **pf_sysfs_device_link,
|
|||
const char *ifname,
|
||||
const char *file)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
||||
G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
|
||||
G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
||||
|
||||
int virNetDevRunEthernetScript(const char *ifname, const char *script)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
int virNetDevVFInterfaceStats(virPCIDeviceAddress *vfAddr,
|
||||
virDomainInterfaceStatsPtr stats)
|
||||
|
|
|
@ -77,4 +77,4 @@ int virNetDevBandwidthUpdateFilter(const char *ifname,
|
|||
|
||||
int virNetDevBandwidthSetRootQDisc(const char *ifname,
|
||||
const char *qdisc)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
|
|
@ -59,7 +59,7 @@ int virNetDevIPAddrAdd(const char *ifname,
|
|||
virSocketAddr *addr,
|
||||
virSocketAddr *peer,
|
||||
unsigned int prefix)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
||||
int virNetDevIPRouteAdd(const char *ifname,
|
||||
virSocketAddr *addr,
|
||||
unsigned int prefix,
|
||||
|
|
|
@ -47,7 +47,7 @@ typedef enum {
|
|||
} virNetDevMacVLanCreateFlags;
|
||||
|
||||
bool virNetDevMacVLanIsMacvtap(const char *ifname)
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
||||
|
||||
int virNetDevMacVLanCreate(const char *ifname,
|
||||
const virMacAddr *macaddress,
|
||||
|
|
|
@ -65,7 +65,7 @@ virNetDevOpenvswitchMaybeUnescapeReply(char *reply)
|
|||
int virNetDevOpenvswitchGetVhostuserIfname(const char *path,
|
||||
bool server,
|
||||
char **ifname)
|
||||
ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
|
||||
ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
||||
|
||||
int virNetDevOpenvswitchUpdateVlan(const char *ifname,
|
||||
const virNetDevVlan *virtVlan)
|
||||
|
|
|
@ -34,7 +34,7 @@ int virNetDevTapCreate(char **ifname,
|
|||
int *tapfd,
|
||||
size_t tapfdSize,
|
||||
unsigned int flags)
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
||||
|
||||
int virNetDevTapDelete(const char *ifname,
|
||||
const char *tunpath)
|
||||
|
@ -44,7 +44,7 @@ int virNetDevTapGetName(int tapfd, char **ifname)
|
|||
ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
||||
|
||||
char* virNetDevTapGetRealDeviceName(char *ifname)
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
||||
|
||||
typedef enum {
|
||||
VIR_NETDEV_TAP_CREATE_NONE = 0,
|
||||
|
@ -99,7 +99,7 @@ int virNetDevTapCreateInBridgePort(const char *brname,
|
|||
unsigned int *actualMTU,
|
||||
unsigned int flags)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
||||
G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
|
||||
G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
||||
|
||||
int virNetDevTapInterfaceStats(const char *ifname,
|
||||
virDomainInterfaceStatsPtr stats,
|
||||
|
|
|
@ -32,20 +32,20 @@ int virNumaSetupMemoryPolicy(virDomainNumatuneMemMode mode,
|
|||
virBitmap *nodeset);
|
||||
|
||||
virBitmap *virNumaGetHostMemoryNodeset(void);
|
||||
bool virNumaNodesetIsAvailable(virBitmap *nodeset) G_GNUC_NO_INLINE;
|
||||
bool virNumaIsAvailable(void) G_GNUC_NO_INLINE;
|
||||
int virNumaGetMaxNode(void) G_GNUC_NO_INLINE;
|
||||
bool virNumaNodeIsAvailable(int node) G_GNUC_NO_INLINE;
|
||||
bool virNumaNodesetIsAvailable(virBitmap *nodeset) G_NO_INLINE;
|
||||
bool virNumaIsAvailable(void) G_NO_INLINE;
|
||||
int virNumaGetMaxNode(void) G_NO_INLINE;
|
||||
bool virNumaNodeIsAvailable(int node) G_NO_INLINE;
|
||||
int virNumaGetDistances(int node,
|
||||
int **distances,
|
||||
int *ndistances) G_GNUC_NO_INLINE;
|
||||
int *ndistances) G_NO_INLINE;
|
||||
int virNumaGetNodeMemory(int node,
|
||||
unsigned long long *memsize,
|
||||
unsigned long long *memfree) G_GNUC_NO_INLINE;
|
||||
unsigned long long *memfree) G_NO_INLINE;
|
||||
|
||||
unsigned int virNumaGetMaxCPUs(void) G_GNUC_NO_INLINE;
|
||||
unsigned int virNumaGetMaxCPUs(void) G_NO_INLINE;
|
||||
|
||||
int virNumaGetNodeCPUs(int node, virBitmap **cpus) G_GNUC_NO_INLINE;
|
||||
int virNumaGetNodeCPUs(int node, virBitmap **cpus) G_NO_INLINE;
|
||||
int virNumaNodesetToCPUset(virBitmap *nodeset,
|
||||
virBitmap **cpuset);
|
||||
|
||||
|
@ -59,7 +59,7 @@ int virNumaGetPages(int node,
|
|||
unsigned long long **pages_avail,
|
||||
unsigned long long **pages_free,
|
||||
size_t *npages)
|
||||
ATTRIBUTE_NONNULL(5) G_GNUC_NO_INLINE;
|
||||
ATTRIBUTE_NONNULL(5) G_NO_INLINE;
|
||||
int virNumaSetPagePoolSize(int node,
|
||||
unsigned int page_size,
|
||||
unsigned long long page_count,
|
||||
|
|
|
@ -77,12 +77,12 @@ int virProcessGetNamespaces(pid_t pid,
|
|||
int virProcessSetNamespaces(size_t nfdlist,
|
||||
int *fdlist);
|
||||
|
||||
int virProcessSetMaxMemLock(pid_t pid, unsigned long long bytes) G_GNUC_NO_INLINE;
|
||||
int virProcessSetMaxMemLock(pid_t pid, unsigned long long bytes) G_NO_INLINE;
|
||||
int virProcessSetMaxProcesses(pid_t pid, unsigned int procs);
|
||||
int virProcessSetMaxFiles(pid_t pid, unsigned int files);
|
||||
int virProcessSetMaxCoreSize(pid_t pid, unsigned long long bytes);
|
||||
|
||||
int virProcessGetMaxMemLock(pid_t pid, unsigned long long *bytes) G_GNUC_NO_INLINE;
|
||||
int virProcessGetMaxMemLock(pid_t pid, unsigned long long *bytes) G_NO_INLINE;
|
||||
|
||||
/* Callback to run code within the mount namespace tied to the given
|
||||
* pid. This function must use only async-signal-safe functions, as
|
||||
|
@ -110,7 +110,7 @@ typedef int (*virProcessForkCallback)(pid_t ppid,
|
|||
|
||||
int virProcessRunInFork(virProcessForkCallback cb,
|
||||
void *opaque)
|
||||
G_GNUC_NO_INLINE;
|
||||
G_NO_INLINE;
|
||||
|
||||
int virProcessSetupPrivateMountNS(void);
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
|
||||
#include "internal.h"
|
||||
|
||||
uint64_t virRandomBits(int nbits) G_GNUC_NO_INLINE;
|
||||
uint64_t virRandomBits(int nbits) G_NO_INLINE;
|
||||
double virRandom(void);
|
||||
uint32_t virRandomInt(uint32_t max);
|
||||
int virRandomBytes(unsigned char *buf, size_t buflen)
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
|
||||
int virRandomGenerateWWN(char **wwn, const char *virt_type) G_GNUC_NO_INLINE;
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
||||
int virRandomGenerateWWN(char **wwn, const char *virt_type) G_NO_INLINE;
|
||||
char *virRandomToken(size_t len);
|
||||
|
|
|
@ -34,7 +34,7 @@ char *virSCSIDeviceGetSgName(const char *sysfs_prefix,
|
|||
const char *adapter,
|
||||
unsigned int bus,
|
||||
unsigned int target,
|
||||
unsigned long long unit) G_GNUC_NO_INLINE;
|
||||
unsigned long long unit) G_NO_INLINE;
|
||||
char *virSCSIDeviceGetDevName(const char *sysfs_prefix,
|
||||
const char *adapter,
|
||||
unsigned int bus,
|
||||
|
|
|
@ -57,6 +57,6 @@ void virSCSIVHostDeviceGetUsedBy(virSCSIVHostDevice *dev,
|
|||
const char **drv_name,
|
||||
const char **dom_name);
|
||||
void virSCSIVHostDeviceFree(virSCSIVHostDevice *dev);
|
||||
int virSCSIVHostOpenVhostSCSI(int *vhostfd) G_GNUC_NO_INLINE;
|
||||
int virSCSIVHostOpenVhostSCSI(int *vhostfd) G_NO_INLINE;
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virSCSIVHostDevice, virSCSIVHostDeviceFree);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
char *virTPMCreateCancelPath(const char *devpath) G_GNUC_NO_INLINE;
|
||||
char *virTPMCreateCancelPath(const char *devpath) G_NO_INLINE;
|
||||
|
||||
char *virTPMGetSwtpm(void);
|
||||
char *virTPMGetSwtpmSetup(void);
|
||||
|
|
|
@ -89,17 +89,17 @@ static inline int pthread_sigmask(int how,
|
|||
}
|
||||
#endif
|
||||
|
||||
char *virGetHostname(void) G_GNUC_NO_INLINE;
|
||||
char *virGetHostname(void) G_NO_INLINE;
|
||||
char *virGetHostnameQuiet(void);
|
||||
|
||||
char *virGetUserDirectory(void);
|
||||
char *virGetUserDirectoryByUID(uid_t uid);
|
||||
char *virGetUserConfigDirectory(void);
|
||||
char *virGetUserCacheDirectory(void);
|
||||
char *virGetUserRuntimeDirectory(void) G_GNUC_NO_INLINE;
|
||||
char *virGetUserRuntimeDirectory(void) G_NO_INLINE;
|
||||
char *virGetUserShell(uid_t uid);
|
||||
char *virGetUserName(uid_t uid) G_GNUC_NO_INLINE;
|
||||
char *virGetGroupName(gid_t gid) G_GNUC_NO_INLINE;
|
||||
char *virGetUserName(uid_t uid) G_NO_INLINE;
|
||||
char *virGetGroupName(gid_t gid) G_NO_INLINE;
|
||||
int virGetGroupList(uid_t uid, gid_t group, gid_t **groups)
|
||||
ATTRIBUTE_NONNULL(3);
|
||||
int virGetUserID(const char *name,
|
||||
|
@ -119,16 +119,16 @@ int virParseOwnershipIds(const char *label, uid_t *uidPtr, gid_t *gidPtr);
|
|||
time_t virGetSelfLastChanged(void);
|
||||
void virUpdateSelfLastChanged(const char *path);
|
||||
|
||||
long virGetSystemPageSize(void) G_GNUC_NO_INLINE;
|
||||
long virGetSystemPageSizeKB(void) G_GNUC_NO_INLINE;
|
||||
long virGetSystemPageSize(void) G_NO_INLINE;
|
||||
long virGetSystemPageSizeKB(void) G_NO_INLINE;
|
||||
|
||||
unsigned long long virMemoryLimitTruncate(unsigned long long value);
|
||||
bool virMemoryLimitIsSet(unsigned long long value);
|
||||
unsigned long long virMemoryMaxValue(bool ulong) G_GNUC_NO_INLINE;
|
||||
unsigned long long virMemoryMaxValue(bool ulong) G_NO_INLINE;
|
||||
|
||||
bool virHostHasIOMMU(void);
|
||||
|
||||
char *virHostGetDRMRenderNode(void) G_GNUC_NO_INLINE;
|
||||
char *virHostGetDRMRenderNode(void) G_NO_INLINE;
|
||||
|
||||
/* Kernel cmdline match and comparison strategy for arg=value pairs */
|
||||
typedef enum {
|
||||
|
|
|
@ -41,11 +41,11 @@
|
|||
|
||||
|
||||
int virSetHostUUIDStr(const char *host_uuid);
|
||||
int virGetHostUUID(unsigned char *host_uuid) ATTRIBUTE_NONNULL(1) G_GNUC_NO_INLINE;
|
||||
int virGetHostUUID(unsigned char *host_uuid) ATTRIBUTE_NONNULL(1) G_NO_INLINE;
|
||||
|
||||
bool virUUIDIsValid(const unsigned char *uuid);
|
||||
|
||||
int virUUIDGenerate(unsigned char *uuid) G_GNUC_NO_INLINE;
|
||||
int virUUIDGenerate(unsigned char *uuid) G_NO_INLINE;
|
||||
|
||||
int virUUIDParse(const char *uuidstr,
|
||||
unsigned char *uuid)
|
||||
|
|
Loading…
Reference in New Issue