From nobody Tue May 14 07:16:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639067766; cv=none; d=zohomail.com; s=zohoarc; b=DySj+yyQz4D39lqyCOqIfuzBn+M+nr7FVQja/jnGKi9VW98MN1MwPoLR3CTi8iCHm+VXt+MxLAmQco4m/9CYeOQTLEdhLwOBClegd71wIXWo0BELk6k/+74Ojjabi6gzFexj85wsyWuqxFG3ktMVmtvb2D0fP7RgIK76IT+bEhk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639067766; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=pFRPgpUGcP0vM+hE65t0pLD1ZVN3mA7erk/MYXoUMwM=; b=Du9A2qqBX5mXzYGEwatWddfqeLmIUk4wROb2NjRlvrL4qSV3uSuj+XsZaGfYX3sloM5shItcW9Cmfod64PRoQ/qBPAeQ6GiC+PHFePMzfIT/lnZ+YN0z7e5lmVjJUMLQg336NtW1GumUEfP9PkvfDa9coC+OJ6927uTpNS9hWLg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1639067766106509.58429254906537; Thu, 9 Dec 2021 08:36:06 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-487-3QMgouP0O1CwB_iKPk8acQ-1; Thu, 09 Dec 2021 11:36:01 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6945E801B31; Thu, 9 Dec 2021 16:35:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8B48122DF1; Thu, 9 Dec 2021 16:35:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 799DB1809CB8; Thu, 9 Dec 2021 16:35:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B9GZpMO017295 for ; Thu, 9 Dec 2021 11:35:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id 743AB19D9F; Thu, 9 Dec 2021 16:35:51 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id D857F19729 for ; Thu, 9 Dec 2021 16:35:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639067765; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=pFRPgpUGcP0vM+hE65t0pLD1ZVN3mA7erk/MYXoUMwM=; b=DICzMJYcRYLL7LajDB62pXAFNdvsBCMTjhrdC6/1PGNuMgieJwc+ScgbW8vjmEz5+IHlBn 27cvAK5TvhAPhnntjeT3/ZzPX+jrLU8+Ada5q9WbssnxOFMdl/R3lZ4n9dPbJwuidgz5YP WuhWCu9krzWroOokeenNb0cAfoQWr+Y= X-MC-Unique: 3QMgouP0O1CwB_iKPk8acQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] qemu_monitor_json.h: Unify header formatting Date: Thu, 9 Dec 2021 17:35:34 +0100 Message-Id: <7983ccede6a1967e76a7cd3d11c2d41c31d53d98.1639067734.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639067766832100001 Content-Type: text/plain; charset="utf-8" Use the modern style and fix all offenders since new functions were already using the contemporary style. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_monitor_json.h | 957 ++++++++++++++++++++--------------- 1 file changed, 551 insertions(+), 406 deletions(-) diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 0984717675..64064b0519 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -28,61 +28,82 @@ #include "cpu/cpu.h" #include "util/virgic.h" -int qemuMonitorJSONIOProcessLine(qemuMonitor *mon, - const char *line, - qemuMonitorMessage *msg) G_GNUC_NO_INLINE; - -int qemuMonitorJSONIOProcess(qemuMonitor *mon, - const char *data, - size_t len, - qemuMonitorMessage *msg); - -int qemuMonitorJSONHumanCommand(qemuMonitor *mon, - const char *cmd, - char **reply); - -int qemuMonitorJSONSetCapabilities(qemuMonitor *mon); - -int qemuMonitorJSONStartCPUs(qemuMonitor *mon); -int qemuMonitorJSONStopCPUs(qemuMonitor *mon); -int qemuMonitorJSONGetStatus(qemuMonitor *mon, - bool *running, - virDomainPausedReason *reason); - -int qemuMonitorJSONSystemPowerdown(qemuMonitor *mon); -int qemuMonitorJSONSystemReset(qemuMonitor *mon); - -int qemuMonitorJSONQueryCPUs(qemuMonitor *mon, - struct qemuMonitorQueryCpusEntry **entries, - size_t *nentries, - bool force, - bool fast); -int qemuMonitorJSONUpdateVideoMemorySize(qemuMonitor *mon, - virDomainVideoDef *video, - char *path); -int qemuMonitorJSONUpdateVideoVram64Size(qemuMonitor *mon, - virDomainVideoDef *video, - char *path); -int qemuMonitorJSONGetBalloonInfo(qemuMonitor *mon, - unsigned long long *currmem); -int qemuMonitorJSONGetMemoryStats(qemuMonitor *mon, - char *balloonpath, - virDomainMemoryStatPtr stats, - unsigned int nr_stats); -int qemuMonitorJSONSetMemoryStatsPeriod(qemuMonitor *mon, - char *balloonpath, - int period); -int qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, - GHashTable *table); - -virJSONValue *qemuMonitorJSONQueryBlockstats(qemuMonitor *mon, - bool queryNodes); -int qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, - GHashTable *hash); -int qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitor *mon, - GHashTable *stats); -int qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, - GHashTable *stats); +int +qemuMonitorJSONIOProcessLine(qemuMonitor *mon, + const char *line, + qemuMonitorMessage *msg) + G_GNUC_NO_INLINE; + +int +qemuMonitorJSONIOProcess(qemuMonitor *mon, + const char *data, + size_t len, + qemuMonitorMessage *msg); + +int +qemuMonitorJSONHumanCommand(qemuMonitor *mon, + const char *cmd, + char **reply); + +int +qemuMonitorJSONSetCapabilities(qemuMonitor *mon); + +int +qemuMonitorJSONStartCPUs(qemuMonitor *mon); +int +qemuMonitorJSONStopCPUs(qemuMonitor *mon); +int +qemuMonitorJSONGetStatus(qemuMonitor *mon, + bool *running, + virDomainPausedReason *reason); + +int +qemuMonitorJSONSystemPowerdown(qemuMonitor *mon); +int +qemuMonitorJSONSystemReset(qemuMonitor *mon); + +int +qemuMonitorJSONQueryCPUs(qemuMonitor *mon, + struct qemuMonitorQueryCpusEntry **entries, + size_t *nentries, + bool force, + bool fast); +int +qemuMonitorJSONUpdateVideoMemorySize(qemuMonitor *mon, + virDomainVideoDef *video, + char *path); +int +qemuMonitorJSONUpdateVideoVram64Size(qemuMonitor *mon, + virDomainVideoDef *video, + char *path); +int +qemuMonitorJSONGetBalloonInfo(qemuMonitor *mon, + unsigned long long *currmem); +int +qemuMonitorJSONGetMemoryStats(qemuMonitor *mon, + char *balloonpath, + virDomainMemoryStatPtr stats, + unsigned int nr_stats); +int +qemuMonitorJSONSetMemoryStatsPeriod(qemuMonitor *mon, + char *balloonpath, + int period); +int +qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, + GHashTable *table); + +virJSONValue * +qemuMonitorJSONQueryBlockstats(qemuMonitor *mon, + bool queryNodes); +int +qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, + GHashTable *hash); +int +qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitor *mon, + GHashTable *stats); +int +qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, + GHashTable *stats); GHashTable * qemuMonitorJSONBlockGetNamedNodeDataJSON(virJSONValue *nodes); @@ -91,236 +112,295 @@ GHashTable * qemuMonitorJSONBlockGetNamedNodeData(qemuMonitor *mon, bool supports_flat); -int qemuMonitorJSONBlockResize(qemuMonitor *mon, - const char *device, - const char *nodename, - unsigned long long size); - -int qemuMonitorJSONSetPassword(qemuMonitor *mon, - const char *protocol, - const char *password, - const char *action_if_connected); -int qemuMonitorJSONExpirePassword(qemuMonitor *mon, - const char *protocol, - const char *expire_time); -int qemuMonitorJSONSetBalloon(qemuMonitor *mon, - unsigned long long newmem); - -int qemuMonitorJSONEjectMedia(qemuMonitor *mon, - const char *dev_name, - bool force); -int qemuMonitorJSONChangeMedia(qemuMonitor *mon, - const char *dev_name, - const char *newmedia, - const char *format); - - -int qemuMonitorJSONSaveVirtualMemory(qemuMonitor *mon, - unsigned long long offset, - unsigned long long length, - const char *path); -int qemuMonitorJSONSavePhysicalMemory(qemuMonitor *mon, - unsigned long long offset, - unsigned long long length, - const char *path); - -int qemuMonitorJSONSetMigrationSpeed(qemuMonitor *mon, - unsigned long bandwidth); - -int qemuMonitorJSONSetMigrationDowntime(qemuMonitor *mon, - unsigned long long downtime); - -int qemuMonitorJSONGetMigrationCacheSize(qemuMonitor *mon, - unsigned long long *cacheSize); -int qemuMonitorJSONSetMigrationCacheSize(qemuMonitor *mon, - unsigned long long cacheSize); - -int qemuMonitorJSONGetMigrationParams(qemuMonitor *mon, - virJSONValue **params); -int qemuMonitorJSONSetMigrationParams(qemuMonitor *mon, - virJSONValue **params); +int +qemuMonitorJSONBlockResize(qemuMonitor *mon, + const char *device, + const char *nodename, + unsigned long long size); -int qemuMonitorJSONGetMigrationStats(qemuMonitor *mon, - qemuMonitorMigrationStats *stats, - char **error); +int +qemuMonitorJSONSetPassword(qemuMonitor *mon, + const char *protocol, + const char *password, + const char *action_if_connected); +int +qemuMonitorJSONExpirePassword(qemuMonitor *mon, + const char *protocol, + const char *expire_time); +int +qemuMonitorJSONSetBalloon(qemuMonitor *mon, + unsigned long long newmem); -int qemuMonitorJSONGetMigrationCapabilities(qemuMonitor *mon, - char ***capabilities); -int qemuMonitorJSONSetMigrationCapabilities(qemuMonitor *mon, - virJSONValue **caps); +int +qemuMonitorJSONEjectMedia(qemuMonitor *mon, + const char *dev_name, + bool force); +int +qemuMonitorJSONChangeMedia(qemuMonitor *mon, + const char *dev_name, + const char *newmedia, + const char *format); -int qemuMonitorJSONGetGICCapabilities(qemuMonitor *mon, - virGICCapability **capabilities); +int +qemuMonitorJSONSaveVirtualMemory(qemuMonitor *mon, + unsigned long long offset, + unsigned long long length, + const char *path); +int +qemuMonitorJSONSavePhysicalMemory(qemuMonitor *mon, + unsigned long long offset, + unsigned long long length, + const char *path); -int qemuMonitorJSONGetSEVCapabilities(qemuMonitor *mon, - virSEVCapability **capabilities); +int +qemuMonitorJSONSetMigrationSpeed(qemuMonitor *mon, + unsigned long bandwidth); -int qemuMonitorJSONMigrate(qemuMonitor *mon, - unsigned int flags, - const char *uri); -int qemuMonitorJSONGetSpiceMigrationStatus(qemuMonitor *mon, - bool *spice_migrated); +int +qemuMonitorJSONSetMigrationDowntime(qemuMonitor *mon, + unsigned long long downtime); +int +qemuMonitorJSONGetMigrationCacheSize(qemuMonitor *mon, + unsigned long long *cacheSize); +int +qemuMonitorJSONSetMigrationCacheSize(qemuMonitor *mon, + unsigned long long cacheSize); -int qemuMonitorJSONMigrateCancel(qemuMonitor *mon); +int +qemuMonitorJSONGetMigrationParams(qemuMonitor *mon, + virJSONValue **params); +int +qemuMonitorJSONSetMigrationParams(qemuMonitor *mon, + virJSONValue **params); -int qemuMonitorJSONQueryDump(qemuMonitor *mon, - qemuMonitorDumpStats *stats); +int +qemuMonitorJSONGetMigrationStats(qemuMonitor *mon, + qemuMonitorMigrationStats *stats, + char **error); + +int +qemuMonitorJSONGetMigrationCapabilities(qemuMonitor *mon, + char ***capabilities); +int +qemuMonitorJSONSetMigrationCapabilities(qemuMonitor *mon, + virJSONValue **caps); + +int +qemuMonitorJSONGetGICCapabilities(qemuMonitor *mon, + virGICCapability **capabilities); + +int +qemuMonitorJSONGetSEVCapabilities(qemuMonitor *mon, + virSEVCapability **capabilities); + +int +qemuMonitorJSONMigrate(qemuMonitor *mon, + unsigned int flags, + const char *uri); +int +qemuMonitorJSONGetSpiceMigrationStatus(qemuMonitor *mon, + bool *spice_migrated); -int qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitor *mon, - const char *capability); -int qemuMonitorJSONDump(qemuMonitor *mon, - const char *protocol, - const char *dumpformat, - bool detach); +int +qemuMonitorJSONMigrateCancel(qemuMonitor *mon); + +int +qemuMonitorJSONQueryDump(qemuMonitor *mon, + qemuMonitorDumpStats *stats); + +int +qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitor *mon, + const char *capability); -int qemuMonitorJSONGraphicsRelocate(qemuMonitor *mon, - int type, - const char *hostname, - int port, - int tlsPort, - const char *tlsSubject); +int +qemuMonitorJSONDump(qemuMonitor *mon, + const char *protocol, + const char *dumpformat, + bool detach); -int qemuMonitorJSONAddPCIHostDevice(qemuMonitor *mon, - virPCIDeviceAddress *hostAddr, - virPCIDeviceAddress *guestAddr); +int +qemuMonitorJSONGraphicsRelocate(qemuMonitor *mon, + int type, + const char *hostname, + int port, + int tlsPort, + const char *tlsSubject); -int qemuMonitorJSONAddPCIDisk(qemuMonitor *mon, - const char *path, - const char *bus, - virPCIDeviceAddress *guestAddr); +int +qemuMonitorJSONAddPCIHostDevice(qemuMonitor *mon, + virPCIDeviceAddress *hostAddr, + virPCIDeviceAddress *guestAddr); + +int +qemuMonitorJSONAddPCIDisk(qemuMonitor *mon, + const char *path, + const char *bus, + virPCIDeviceAddress *guestAddr); -int qemuMonitorJSONAddPCINetwork(qemuMonitor *mon, - const char *nicstr, - virPCIDeviceAddress *guestAddr); +int +qemuMonitorJSONAddPCINetwork(qemuMonitor *mon, + const char *nicstr, + virPCIDeviceAddress *guestAddr); -int qemuMonitorJSONRemovePCIDevice(qemuMonitor *mon, - virPCIDeviceAddress *guestAddr); +int +qemuMonitorJSONRemovePCIDevice(qemuMonitor *mon, + virPCIDeviceAddress *guestAddr); -int qemuMonitorJSONAddFileHandleToSet(qemuMonitor *mon, - int fd, - int fdset, - const char *opaque, - qemuMonitorAddFdInfo *info); +int +qemuMonitorJSONAddFileHandleToSet(qemuMonitor *mon, + int fd, + int fdset, + const char *opaque, + qemuMonitorAddFdInfo *info); -int qemuMonitorJSONRemoveFdset(qemuMonitor *mon, - int fdset); +int +qemuMonitorJSONRemoveFdset(qemuMonitor *mon, + int fdset); -int qemuMonitorJSONQueryFdsets(qemuMonitor *mon, - qemuMonitorFdsets **fdsets); +int +qemuMonitorJSONQueryFdsets(qemuMonitor *mon, + qemuMonitorFdsets **fdsets); -int qemuMonitorJSONSendFileHandle(qemuMonitor *mon, - const char *fdname, - int fd); +int +qemuMonitorJSONSendFileHandle(qemuMonitor *mon, + const char *fdname, + int fd); -int qemuMonitorJSONCloseFileHandle(qemuMonitor *mon, - const char *fdname); +int +qemuMonitorJSONCloseFileHandle(qemuMonitor *mon, + const char *fdname); -int qemuMonitorJSONAddNetdev(qemuMonitor *mon, - virJSONValue **props); +int +qemuMonitorJSONAddNetdev(qemuMonitor *mon, + virJSONValue **props); -int qemuMonitorJSONRemoveNetdev(qemuMonitor *mon, - const char *alias); +int +qemuMonitorJSONRemoveNetdev(qemuMonitor *mon, + const char *alias); -int qemuMonitorJSONQueryRxFilter(qemuMonitor *mon, const char *alias, - virNetDevRxFilter **filter); +int +qemuMonitorJSONQueryRxFilter(qemuMonitor *mon, + const char *alias, + virNetDevRxFilter **filter); -int qemuMonitorJSONGetChardevInfo(qemuMonitor *mon, - GHashTable *info); +int +qemuMonitorJSONGetChardevInfo(qemuMonitor *mon, + GHashTable *info); -int qemuMonitorJSONAttachPCIDiskController(qemuMonitor *mon, - const char *bus, - virPCIDeviceAddress *guestAddr); +int +qemuMonitorJSONAttachPCIDiskController(qemuMonitor *mon, + const char *bus, + virPCIDeviceAddress *guestAddr); -int qemuMonitorJSONAddDeviceProps(qemuMonitor *mon, - virJSONValue **props); +int +qemuMonitorJSONAddDeviceProps(qemuMonitor *mon, + virJSONValue **props); -int qemuMonitorJSONDelDevice(qemuMonitor *mon, - const char *devalias); +int +qemuMonitorJSONDelDevice(qemuMonitor *mon, + const char *devalias); -int qemuMonitorJSONAddObject(qemuMonitor *mon, - virJSONValue **props); +int +qemuMonitorJSONAddObject(qemuMonitor *mon, + virJSONValue **props); -int qemuMonitorJSONDelObject(qemuMonitor *mon, - const char *objalias, - bool report_error); +int +qemuMonitorJSONDelObject(qemuMonitor *mon, + const char *objalias, + bool report_error); -int qemuMonitorJSONTransaction(qemuMonitor *mon, virJSONValue **actions) +int +qemuMonitorJSONTransaction(qemuMonitor *mon, + virJSONValue **actions) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONDriveMirror(qemuMonitor *mon, - const char *device, - const char *file, - const char *format, - unsigned long long speed, - unsigned int granularity, - unsigned long long buf_size, - bool shallow, - bool reuse) +int +qemuMonitorJSONDriveMirror(qemuMonitor *mon, + const char *device, + const char *file, + const char *format, + unsigned long long speed, + unsigned int granularity, + unsigned long long buf_size, + bool shallow, + bool reuse) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -int qemuMonitorJSONBlockdevMirror(qemuMonitor *mon, - const char *jobname, - bool persistjob, - const char *device, - const char *target, - unsigned long long speed, - unsigned int granularity, - unsigned long long buf_size, - bool shallow, - bool syncWrite) + +int +qemuMonitorJSONBlockdevMirror(qemuMonitor *mon, + const char *jobname, + bool persistjob, + const char *device, + const char *target, + unsigned long long speed, + unsigned int granularity, + unsigned long long buf_size, + bool shallow, + bool syncWrite) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5); -int qemuMonitorJSONDrivePivot(qemuMonitor *mon, - const char *jobname) + +int +qemuMonitorJSONDrivePivot(qemuMonitor *mon, + const char *jobname) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONBlockCommit(qemuMonitor *mon, - const char *device, - const char *jobname, - bool persistjob, - const char *top, - const char *topNode, - const char *base, - const char *baseNode, - const char *backingName, - unsigned long long bandwidth) +int +qemuMonitorJSONBlockCommit(qemuMonitor *mon, + const char *device, + const char *jobname, + bool persistjob, + const char *top, + const char *topNode, + const char *base, + const char *baseNode, + const char *backingName, + unsigned long long bandwidth) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -char *qemuMonitorJSONDiskNameLookup(qemuMonitor *mon, - const char *device, - virStorageSource *top, - virStorageSource *target) +char * +qemuMonitorJSONDiskNameLookup(qemuMonitor *mon, + const char *device, + virStorageSource *top, + virStorageSource *target) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); -int qemuMonitorJSONArbitraryCommand(qemuMonitor *mon, - const char *cmd_str, - char **reply_str); +int +qemuMonitorJSONArbitraryCommand(qemuMonitor *mon, + const char *cmd_str, + char **reply_str); -int qemuMonitorJSONInjectNMI(qemuMonitor *mon); +int +qemuMonitorJSONInjectNMI(qemuMonitor *mon); -int qemuMonitorJSONSendKey(qemuMonitor *mon, - unsigned int holdtime, - unsigned int *keycodes, - unsigned int nkeycodes); +int +qemuMonitorJSONSendKey(qemuMonitor *mon, + unsigned int holdtime, + unsigned int *keycodes, + unsigned int nkeycodes); -int qemuMonitorJSONScreendump(qemuMonitor *mon, - const char *device, - unsigned int head, - const char *file); - -int qemuMonitorJSONBlockStream(qemuMonitor *mon, - const char *device, - const char *jobname, - bool persistjob, - const char *base, - const char *baseNode, - const char *backingName, - unsigned long long speed) +int +qemuMonitorJSONScreendump(qemuMonitor *mon, + const char *device, + unsigned int head, + const char *file); + +int +qemuMonitorJSONBlockStream(qemuMonitor *mon, + const char *device, + const char *jobname, + bool persistjob, + const char *base, + const char *baseNode, + const char *backingName, + unsigned long long speed) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONBlockJobCancel(qemuMonitor *mon, - const char *jobname, - bool force) +int +qemuMonitorJSONBlockJobCancel(qemuMonitor *mon, + const char *jobname, + bool force) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int @@ -329,93 +409,114 @@ qemuMonitorJSONGetJobInfo(qemuMonitor *mon, size_t *njobs); -int qemuMonitorJSONBlockJobSetSpeed(qemuMonitor *mon, - const char *jobname, - unsigned long long speed) +int +qemuMonitorJSONBlockJobSetSpeed(qemuMonitor *mon, + const char *jobname, + unsigned long long speed) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -GHashTable *qemuMonitorJSONGetAllBlockJobInfo(qemuMonitor *mon, - bool rawjobname) +GHashTable * +qemuMonitorJSONGetAllBlockJobInfo(qemuMonitor *mon, + bool rawjobname) ATTRIBUTE_NONNULL(1); -int qemuMonitorJSONJobDismiss(qemuMonitor *mon, - const char *jobname) +int +qemuMonitorJSONJobDismiss(qemuMonitor *mon, + const char *jobname) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONJobComplete(qemuMonitor *mon, - const char *jobname) +int +qemuMonitorJSONJobComplete(qemuMonitor *mon, + const char *jobname) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONSetLink(qemuMonitor *mon, - const char *name, - virDomainNetInterfaceLinkState state); +int +qemuMonitorJSONSetLink(qemuMonitor *mon, + const char *name, + virDomainNetInterfaceLinkState state); -int qemuMonitorJSONOpenGraphics(qemuMonitor *mon, - const char *protocol, - const char *fdname, - bool skipauth); +int +qemuMonitorJSONOpenGraphics(qemuMonitor *mon, + const char *protocol, + const char *fdname, + bool skipauth); -int qemuMonitorJSONSetBlockIoThrottle(qemuMonitor *mon, - const char *drivealias, - const char *qomid, - virDomainBlockIoTuneInfo *info); +int +qemuMonitorJSONSetBlockIoThrottle(qemuMonitor *mon, + const char *drivealias, + const char *qomid, + virDomainBlockIoTuneInfo *info); -int qemuMonitorJSONGetBlockIoThrottle(qemuMonitor *mon, - const char *drivealias, - const char *qdevid, - virDomainBlockIoTuneInfo *reply); +int +qemuMonitorJSONGetBlockIoThrottle(qemuMonitor *mon, + const char *drivealias, + const char *qdevid, + virDomainBlockIoTuneInfo *reply); -int qemuMonitorJSONSystemWakeup(qemuMonitor *mon); +int +qemuMonitorJSONSystemWakeup(qemuMonitor *mon); -char *qemuMonitorJSONGetSEVMeasurement(qemuMonitor *mon); +char * +qemuMonitorJSONGetSEVMeasurement(qemuMonitor *mon); -int qemuMonitorJSONGetVersion(qemuMonitor *mon, - int *major, - int *minor, - int *micro, - char **package) +int +qemuMonitorJSONGetVersion(qemuMonitor *mon, + int *major, + int *minor, + int *micro, + char **package) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); -int qemuMonitorJSONGetMachines(qemuMonitor *mon, - qemuMonitorMachineInfo ***machines) +int +qemuMonitorJSONGetMachines(qemuMonitor *mon, + qemuMonitorMachineInfo ***machines) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONGetCPUDefinitions(qemuMonitor *mon, - qemuMonitorCPUDefs **cpuDefs) +int +qemuMonitorJSONGetCPUDefinitions(qemuMonitor *mon, + qemuMonitorCPUDefs **cpuDefs) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONGetCPUModelExpansion(qemuMonitor *mon, - qemuMonitorCPUModelExpansionType t= ype, - virCPUDef *cpu, - bool migratable, - bool fail_no_props, - qemuMonitorCPUModelInfo **model_in= fo) +int +qemuMonitorJSONGetCPUModelExpansion(qemuMonitor *mon, + qemuMonitorCPUModelExpansionType type, + virCPUDef *cpu, + bool migratable, + bool fail_no_props, + qemuMonitorCPUModelInfo **model_info) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(6); -int qemuMonitorJSONGetCPUModelBaseline(qemuMonitor *mon, - virCPUDef *cpu_a, - virCPUDef *cpu_b, - qemuMonitorCPUModelInfo **baseline) +int +qemuMonitorJSONGetCPUModelBaseline(qemuMonitor *mon, + virCPUDef *cpu_a, + virCPUDef *cpu_b, + qemuMonitorCPUModelInfo **baseline) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); -int qemuMonitorJSONGetCPUModelComparison(qemuMonitor *mon, - virCPUDef *cpu_a, - virCPUDef *cpu_b, - char **result) +int +qemuMonitorJSONGetCPUModelComparison(qemuMonitor *mon, + virCPUDef *cpu_a, + virCPUDef *cpu_b, + char **result) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -int qemuMonitorJSONGetCommands(qemuMonitor *mon, - char ***commands) +int +qemuMonitorJSONGetCommands(qemuMonitor *mon, + char ***commands) ATTRIBUTE_NONNULL(2); -GHashTable *qemuMonitorJSONGetCommandLineOptions(qemuMonitor *mon); -int qemuMonitorJSONGetKVMState(qemuMonitor *mon, - bool *enabled, - bool *present) +GHashTable * +qemuMonitorJSONGetCommandLineOptions(qemuMonitor *mon); + +int +qemuMonitorJSONGetKVMState(qemuMonitor *mon, + bool *enabled, + bool *present) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -int qemuMonitorJSONGetObjectTypes(qemuMonitor *mon, - char ***types) +int +qemuMonitorJSONGetObjectTypes(qemuMonitor *mon, + char ***types) ATTRIBUTE_NONNULL(2); /* ListPath structures and API's are public only for qemumonitorjsontest */ @@ -425,12 +526,14 @@ struct _qemuMonitorJSONListPath { char *type; }; -int qemuMonitorJSONGetObjectListPaths(qemuMonitor *mon, - const char *path, - qemuMonitorJSONListPath ***paths) +int +qemuMonitorJSONGetObjectListPaths(qemuMonitor *mon, + const char *path, + qemuMonitorJSONListPath ***paths) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -void qemuMonitorJSONListPathFree(qemuMonitorJSONListPath *paths); +void +qemuMonitorJSONListPathFree(qemuMonitorJSONListPath *paths); /* ObjectProperty structures and Get/Set API's are public only * for qemumonitorjsontest @@ -462,166 +565,207 @@ struct _qemuMonitorJSONObjectProperty { } val; }; -int qemuMonitorJSONGetObjectProperty(qemuMonitor *mon, - const char *path, - const char *property, - qemuMonitorJSONObjectProperty *prop) +int +qemuMonitorJSONGetObjectProperty(qemuMonitor *mon, + const char *path, + const char *property, + qemuMonitorJSONObjectProperty *prop) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); -int qemuMonitorJSONSetObjectProperty(qemuMonitor *mon, - const char *path, - const char *property, - qemuMonitorJSONObjectProperty *prop) +int +qemuMonitorJSONSetObjectProperty(qemuMonitor *mon, + const char *path, + const char *property, + qemuMonitorJSONObjectProperty *prop) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); -GHashTable *qemuMonitorJSONGetDeviceProps(qemuMonitor *mon, - const char *device) +GHashTable * +qemuMonitorJSONGetDeviceProps(qemuMonitor *mon, + const char *device) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONGetObjectProps(qemuMonitor *mon, - const char *object, - char ***props) +int +qemuMonitorJSONGetObjectProps(qemuMonitor *mon, + const char *object, + char ***props) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -char *qemuMonitorJSONGetTargetArch(qemuMonitor *mon); - -int qemuMonitorJSONNBDServerStart(qemuMonitor *mon, - const virStorageNetHostDef *server, - const char *tls_alias); -int qemuMonitorJSONNBDServerAdd(qemuMonitor *mon, - const char *deviceID, - const char *export, - bool writable, - const char *bitmap); -int qemuMonitorJSONNBDServerStop(qemuMonitor *mon); - -int qemuMonitorJSONBlockExportAdd(qemuMonitor *mon, - virJSONValue **props); - -int qemuMonitorJSONGetTPMModels(qemuMonitor *mon, - char ***tpmmodels) + +char * +qemuMonitorJSONGetTargetArch(qemuMonitor *mon); + +int +qemuMonitorJSONNBDServerStart(qemuMonitor *mon, + const virStorageNetHostDef *server, + const char *tls_alias); +int +qemuMonitorJSONNBDServerAdd(qemuMonitor *mon, + const char *deviceID, + const char *export, + bool writable, + const char *bitmap); +int +qemuMonitorJSONNBDServerStop(qemuMonitor *mon); + +int +qemuMonitorJSONBlockExportAdd(qemuMonitor *mon, + virJSONValue **props); + +int +qemuMonitorJSONGetTPMModels(qemuMonitor *mon, + char ***tpmmodels) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONGetTPMTypes(qemuMonitor *mon, - char ***tpmtypes) +int +qemuMonitorJSONGetTPMTypes(qemuMonitor *mon, + char ***tpmtypes) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONAttachCharDev(qemuMonitor *mon, - const char *chrID, - virDomainChrSourceDef *chr); -int qemuMonitorJSONDetachCharDev(qemuMonitor *mon, - const char *chrID); +int +qemuMonitorJSONAttachCharDev(qemuMonitor *mon, + const char *chrID, + virDomainChrSourceDef *chr); +int +qemuMonitorJSONDetachCharDev(qemuMonitor *mon, + const char *chrID); -int qemuMonitorJSONGetDeviceAliases(qemuMonitor *mon, - char ***aliases); +int +qemuMonitorJSONGetDeviceAliases(qemuMonitor *mon, + char ***aliases); -int qemuMonitorJSONGetCPUx86Data(qemuMonitor *mon, - const char *property, - virCPUData **cpudata); +int +qemuMonitorJSONGetCPUx86Data(qemuMonitor *mon, + const char *property, + virCPUData **cpudata); -int qemuMonitorJSONGetGuestCPUx86(qemuMonitor *mon, - virCPUData **data, - virCPUData **disabled); +int +qemuMonitorJSONGetGuestCPUx86(qemuMonitor *mon, + virCPUData **data, + virCPUData **disabled); -int qemuMonitorJSONGetGuestCPU(qemuMonitor *mon, - virArch arch, - qemuMonitorCPUFeatureTranslationCallback tr= anslate, - void *opaque, - virCPUData **enabled, - virCPUData **disabled); +int +qemuMonitorJSONGetGuestCPU(qemuMonitor *mon, + virArch arch, + qemuMonitorCPUFeatureTranslationCallback transl= ate, + void *opaque, + virCPUData **enabled, + virCPUData **disabled); -int qemuMonitorJSONRTCResetReinjection(qemuMonitor *mon); +int +qemuMonitorJSONRTCResetReinjection(qemuMonitor *mon); -int qemuMonitorJSONGetIOThreads(qemuMonitor *mon, - qemuMonitorIOThreadInfo ***iothreads, - int *niothreads) +int +qemuMonitorJSONGetIOThreads(qemuMonitor *mon, + qemuMonitorIOThreadInfo ***iothreads, + int *niothreads) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONSetIOThread(qemuMonitor *mon, - qemuMonitorIOThreadInfo *iothreadInfo) +int +qemuMonitorJSONSetIOThread(qemuMonitor *mon, + qemuMonitorIOThreadInfo *iothreadInfo) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONGetMemoryDeviceInfo(qemuMonitor *mon, - GHashTable *info) +int +qemuMonitorJSONGetMemoryDeviceInfo(qemuMonitor *mon, + GHashTable *info) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONFindLinkPath(qemuMonitor *mon, - const char *name, - const char *alias, - char **path) +int +qemuMonitorJSONFindLinkPath(qemuMonitor *mon, + const char *name, + const char *alias, + char **path) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4); -int qemuMonitorJSONMigrateIncoming(qemuMonitor *mon, - const char *uri) +int +qemuMonitorJSONMigrateIncoming(qemuMonitor *mon, + const char *uri) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONMigrateStartPostCopy(qemuMonitor *mon) +int +qemuMonitorJSONMigrateStartPostCopy(qemuMonitor *mon) ATTRIBUTE_NONNULL(1); -int qemuMonitorJSONMigrateContinue(qemuMonitor *mon, - qemuMonitorMigrationStatus status) +int +qemuMonitorJSONMigrateContinue(qemuMonitor *mon, + qemuMonitorMigrationStatus status) ATTRIBUTE_NONNULL(1); -int qemuMonitorJSONGetRTCTime(qemuMonitor *mon, - struct tm *tm) +int +qemuMonitorJSONGetRTCTime(qemuMonitor *mon, + struct tm *tm) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONGetHotpluggableCPUs(qemuMonitor *mon, - struct qemuMonitorQueryHotpluggable= CpusEntry **entries, - size_t *nentries) +int +qemuMonitorJSONGetHotpluggableCPUs(qemuMonitor *mon, + struct qemuMonitorQueryHotpluggableCpus= Entry **entries, + size_t *nentries) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -virJSONValue *qemuMonitorJSONQueryQMPSchema(qemuMonitor *mon) +virJSONValue * +qemuMonitorJSONQueryQMPSchema(qemuMonitor *mon) ATTRIBUTE_NONNULL(1); -int qemuMonitorJSONSetBlockThreshold(qemuMonitor *mon, - const char *nodename, - unsigned long long threshold) +int +qemuMonitorJSONSetBlockThreshold(qemuMonitor *mon, + const char *nodename, + unsigned long long threshold) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -virJSONValue *qemuMonitorJSONQueryNamedBlockNodes(qemuMonitor *mon, - bool flat) +virJSONValue * +qemuMonitorJSONQueryNamedBlockNodes(qemuMonitor *mon, + bool flat) ATTRIBUTE_NONNULL(1); -int qemuMonitorJSONSetWatchdogAction(qemuMonitor *mon, - const char *action) +int +qemuMonitorJSONSetWatchdogAction(qemuMonitor *mon, + const char *action) ATTRIBUTE_NONNULL(1); -int qemuMonitorJSONBlockdevCreate(qemuMonitor *mon, - const char *jobname, - virJSONValue **props) +int +qemuMonitorJSONBlockdevCreate(qemuMonitor *mon, + const char *jobname, + virJSONValue **props) ATTRIBUTE_NONNULL(1); -int qemuMonitorJSONBlockdevAdd(qemuMonitor *mon, - virJSONValue **props) +int +qemuMonitorJSONBlockdevAdd(qemuMonitor *mon, + virJSONValue **props) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONBlockdevReopen(qemuMonitor *mon, - virJSONValue **props) +int +qemuMonitorJSONBlockdevReopen(qemuMonitor *mon, + virJSONValue **props) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONBlockdevDel(qemuMonitor *mon, - const char *nodename) +int +qemuMonitorJSONBlockdevDel(qemuMonitor *mon, + const char *nodename) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONBlockdevTrayOpen(qemuMonitor *mon, - const char *id, - bool force) +int +qemuMonitorJSONBlockdevTrayOpen(qemuMonitor *mon, + const char *id, + bool force) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONBlockdevTrayClose(qemuMonitor *mon, - const char *id) +int +qemuMonitorJSONBlockdevTrayClose(qemuMonitor *mon, + const char *id) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONBlockdevMediumRemove(qemuMonitor *mon, - const char *id) +int +qemuMonitorJSONBlockdevMediumRemove(qemuMonitor *mon, + const char *id) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONBlockdevMediumInsert(qemuMonitor *mon, - const char *id, - const char *nodename) +int +qemuMonitorJSONBlockdevMediumInsert(qemuMonitor *mon, + const char *id, + const char *nodename) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -int qemuMonitorJSONGetPRManagerInfo(qemuMonitor *mon, - GHashTable *info) +int +qemuMonitorJSONGetPRManagerInfo(qemuMonitor *mon, + GHashTable *info) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int @@ -684,9 +828,10 @@ qemuMonitorJSONTransactionBackup(virJSONValue *actions, const char *bitmap, qemuMonitorTransactionBackupSyncMode sync= mode); -int qemuMonitorJSONSetDBusVMStateIdList(qemuMonitor *mon, - const char *vmstatepath, - const char *idstr) +int +qemuMonitorJSONSetDBusVMStateIdList(qemuMonitor *mon, + const char *vmstatepath, + const char *idstr) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); int --=20 2.31.1