From nobody Fri May 3 19:39:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1508253893096539.1336639154235; Tue, 17 Oct 2017 08:24:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4CEA81F01; Tue, 17 Oct 2017 15:24:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B30085D9C9; Tue, 17 Oct 2017 15:24:51 +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 7F121410B3; Tue, 17 Oct 2017 15:24:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9HFOfjh007096 for ; Tue, 17 Oct 2017 11:24:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9D3A478002; Tue, 17 Oct 2017 15:24:41 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5618678008; Tue, 17 Oct 2017 15:24:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D4CEA81F01 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Erik Skultety To: libvir-list@redhat.com Date: Tue, 17 Oct 2017 17:24:30 +0200 Message-Id: <63a3b057b078da53bfee20c63a0606a62b615b17.1508253701.git.eskultet@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 1/2] maint: Replace tabs with spaces in all source files in repo 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 17 Oct 2017 15:24:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" So we have a syntax-check rule to catch all tab indents but it naturally can't catch tab spacing, i.e. as a delimiter. This patch is a result of running 'vim -en +retab +wq' (using tabstop=3D8 softtabstop=3D4 shiftwidth=3D4 expandtab) on each file f= rom a list generated by the following: find . -regextype gnu-awk \ -regex ".*\.(rng|syms|html|s?[ch]|py|pl|php(\.code)?)(\.in)?" \ | xargs git grep -lP "\t" Signed-off-by: Erik Skultety --- docs/search.php.code.in | 350 ++++++++++++++++++++++------------------= ---- include/libvirt/virterror.h | 278 +++++++++++++++++------------------ src/bhyve/bhyve_monitor.c | 2 +- src/bhyve/bhyve_process.c | 2 +- src/conf/node_device_conf.h | 52 +++---- src/conf/nwfilter_conf.h | 2 +- src/conf/virnodedeviceobj.c | 2 +- src/conf/virnodedeviceobj.h | 4 +- src/qemu/qemu_domain.h | 8 +- src/qemu/qemu_monitor.h | 2 +- src/util/viraudit.h | 4 +- src/util/virconf.c | 38 ++--- src/util/virconf.h | 10 +- src/util/virerror.h | 6 +- src/util/virsysinfo.c | 2 +- src/util/virxml.c | 8 +- src/xen/xen_driver.h | 2 +- src/xen/xen_hypervisor.c | 168 ++++++++++----------- src/xen/xen_hypervisor.h | 2 +- src/xen/xend_internal.c | 12 +- src/xen/xend_internal.h | 8 +- src/xen/xs_internal.c | 20 +-- src/xen/xs_internal.h | 14 +- 23 files changed, 498 insertions(+), 498 deletions(-) diff --git a/docs/search.php.code.in b/docs/search.php.code.in index 3c66f94ca..01a6a64d2 100644 --- a/docs/search.php.code.in +++ b/docs/search.php.code.in @@ -27,199 +27,199 @@ $rb) ? -1 : 1; + list($ra,$ta,$ma,$na,$da) =3D $a; + list($rb,$tb,$mb,$nb,$db) =3D $b; + if ($ra =3D=3D $rb) return 0; + return ($ra > $rb) ? -1 : 1; } if (($query) && (strlen($query) <=3D 50)) { - $link =3D mysql_connect ("localhost", "nobody"); - if (!$link) { - echo "

Could not connect to the database: ", mysql_error(); - } else { - mysql_select_db("libvir", $link); - $list =3D explode (" ", $query); - $results =3D array(); - $number =3D 0; - for ($number =3D 0;$number < count($list);$number++) { + $link =3D mysql_connect ("localhost", "nobody"); + if (!$link) { + echo "

Could not connect to the database: ", mysql_error(); + } else { + mysql_select_db("libvir", $link); + $list =3D explode (" ", $query); + $results =3D array(); + $number =3D 0; + for ($number =3D 0;$number < count($list);$number++) { =20 - $word =3D $list[$number]; - if (($scope =3D=3D 'any') || ($scope =3D=3D 'API')) { - list($result, $j) =3D queryWord($word); - if ($j > 0) { - for ($i =3D 0; $i < $j; $i++) { - $relevance =3D mysql_result($result, $i, 0); - $name =3D mysql_result($result, $i, 1); - $type =3D mysql_result($result, $i, 2); - $module =3D mysql_result($result, $i, 3); - $desc =3D mysql_result($result, $i, 4); - if (array_key_exists($name, $results)) { - list($r,$t,$m,$d,$w,$u) =3D $results[$name]; - $results[$name] =3D array(($r + $relevance) * 2, - $t,$m,$d,$w,$u); - } else { - $id =3D $name; - $m =3D strtolower($module); - $url =3D "html/libvirt-$module.html#$id"; - $results[$name] =3D array($relevance,$type, - $module, $desc, $name, $url); - } - } - mysql_free_result($result); - } - } - if (($scope =3D=3D 'any') || ($scope =3D=3D 'DOCS')) { - list($result, $k) =3D queryHTMLWord($word); - if ($k > 0) { - for ($i =3D 0; $i < $k; $i++) { - $relevance =3D mysql_result($result, $i, 0); - $name =3D mysql_result($result, $i, 1); - $id =3D mysql_result($result, $i, 2); - $module =3D mysql_result($result, $i, 3); - $desc =3D mysql_result($result, $i, 4); - $url =3D $module; - if ($id !=3D "") { - $url =3D $url + "#$id"; - } - $results["$name _html_ $number _ $i"] =3D - array($relevance, "XML docs", - $module, $desc, $name, $url); - } - mysql_free_result($result); - } - } - if (($scope =3D=3D 'any') || ($scope =3D=3D 'LISTS')) { - list($result, $j) =3D queryArchiveWord($word); - if ($j > 0) { - for ($i =3D 0; $i < $j; $i++) { - $relevance =3D mysql_result($result, $i, 0); - $name =3D mysql_result($result, $i, 1); - $type =3D mysql_result($result, $i, 2); - $url =3D mysql_result($result, $i, 3); - $desc =3D mysql_result($result, $i, 4); - if (array_key_exists($url, $results)) { - list($r,$t,$m,$d,$w,$u) =3D $results[$url]; - $results[$name] =3D array(($r + $relevance) * 2, - $t,$m,$d,$w,$u); - } else { - $id =3D $name; - $m =3D strtolower($module); - $u =3D str_replace( - "http://www.redhat.com/archives/libvir-list/", "", $url); - $results[$url] =3D array($relevance,$type, - $u, $desc, $name, $url); - } - } - mysql_free_result($result); - } - } - } - if ((count($results) =3D=3D 0) && (count($list) =3D=3D 1)) { - $word =3D $list[0]; - if (($scope =3D=3D 'any') || ($scope =3D=3D 'XMLAPI')) { - list($result, $j) =3D queryWord("vir$word"); - if ($j > 0) { - for ($i =3D 0; $i < $j; $i++) { - $relevance =3D mysql_result($result, $i, 0); - $name =3D mysql_result($result, $i, 1); - $type =3D mysql_result($result, $i, 2); - $module =3D mysql_result($result, $i, 3); - $desc =3D mysql_result($result, $i, 4); - if (array_key_exists($name, $results)) { - list($r,$t,$m,$d,$w,$u) =3D $results[$name]; - $results[$name] =3D array(($r + $relevance) * 2, - $t,$m,$d,$w,$u); - } else { - $id =3D $name; - $m =3D strtolower($module); - $url =3D "html/libvirt-$module.html#$id"; - $results[$name] =3D array($relevance,$type, - $module, $desc, $name, $url); - } - } - mysql_free_result($result); - } - } - } - mysql_close($link); - $nb =3D count($results); - echo "

Found $nb results for query $querystr

= \n"; - usort($results, "resSort"); + $word =3D $list[$number]; + if (($scope =3D=3D 'any') || ($scope =3D=3D 'API')) { + list($result, $j) =3D queryWord($word); + if ($j > 0) { + for ($i =3D 0; $i < $j; $i++) { + $relevance =3D mysql_result($result, $i, 0); + $name =3D mysql_result($result, $i, 1); + $type =3D mysql_result($result, $i, 2); + $module =3D mysql_result($result, $i, 3); + $desc =3D mysql_result($result, $i, 4); + if (array_key_exists($name, $results)) { + list($r,$t,$m,$d,$w,$u) =3D $results[$name= ]; + $results[$name] =3D array(($r + $relevance= ) * 2, + $t,$m,$d,$w,$u); + } else { + $id =3D $name; + $m =3D strtolower($module); + $url =3D "html/libvirt-$module.html#$id"; + $results[$name] =3D array($relevance,$type, + $module, $desc, $name, $ur= l); + } + } + mysql_free_result($result); + } + } + if (($scope =3D=3D 'any') || ($scope =3D=3D 'DOCS')) { + list($result, $k) =3D queryHTMLWord($word); + if ($k > 0) { + for ($i =3D 0; $i < $k; $i++) { + $relevance =3D mysql_result($result, $i, 0); + $name =3D mysql_result($result, $i, 1); + $id =3D mysql_result($result, $i, 2); + $module =3D mysql_result($result, $i, 3); + $desc =3D mysql_result($result, $i, 4); + $url =3D $module; + if ($id !=3D "") { + $url =3D $url + "#$id"; + } + $results["$name _html_ $number _ $i"] =3D + array($relevance, "XML docs", + $module, $desc, $name, $ur= l); + } + mysql_free_result($result); + } + } + if (($scope =3D=3D 'any') || ($scope =3D=3D 'LISTS')) { + list($result, $j) =3D queryArchiveWord($word); + if ($j > 0) { + for ($i =3D 0; $i < $j; $i++) { + $relevance =3D mysql_result($result, $i, 0); + $name =3D mysql_result($result, $i, 1); + $type =3D mysql_result($result, $i, 2); + $url =3D mysql_result($result, $i, 3); + $desc =3D mysql_result($result, $i, 4); + if (array_key_exists($url, $results)) { + list($r,$t,$m,$d,$w,$u) =3D $results[$url]; + $results[$name] =3D array(($r + $relevance= ) * 2, + $t,$m,$d,$w,$u); + } else { + $id =3D $name; + $m =3D strtolower($module); + $u =3D str_replace( + "http://www.redhat.com/archives/libvir-list/", "",= $url); + $results[$url] =3D array($relevance,$type, + $u, $desc, $name, $url); + } + } + mysql_free_result($result); + } + } + } + if ((count($results) =3D=3D 0) && (count($list) =3D=3D 1)) { + $word =3D $list[0]; + if (($scope =3D=3D 'any') || ($scope =3D=3D 'XMLAPI')) { + list($result, $j) =3D queryWord("vir$word"); + if ($j > 0) { + for ($i =3D 0; $i < $j; $i++) { + $relevance =3D mysql_result($result, $i, 0); + $name =3D mysql_result($result, $i, 1); + $type =3D mysql_result($result, $i, 2); + $module =3D mysql_result($result, $i, 3); + $desc =3D mysql_result($result, $i, 4); + if (array_key_exists($name, $results)) { + list($r,$t,$m,$d,$w,$u) =3D $results[$name= ]; + $results[$name] =3D array(($r + $relevance= ) * 2, + $t,$m,$d,$w,$u); + } else { + $id =3D $name; + $m =3D strtolower($module); + $url =3D "html/libvirt-$module.html#$id"; + $results[$name] =3D array($relevance,$type, + $module, $desc, $name, $ur= l); + } + } + mysql_free_result($result); + } + } + } + mysql_close($link); + $nb =3D count($results); + echo "

Found $nb results for query $querys= tr

\n"; + usort($results, "resSort"); =20 if ($nb > 0) { - printf("\n"); - printf("<= td>Description\n"); - $i =3D 0; - while (list ($name, $val) =3D each ($results)) { - list($r,$t,$m,$d,$s,$u) =3D $val; - $m =3D str_replace("<", "<", $m); - $s =3D str_replace("<", "<", $s); - $d =3D str_replace("<", "<", $d); - echo ""; - $i =3D $i + 1; - if ($i > 75) - break; - } - printf("
QualitySymbolTypemodule
$r$s$t$m= $d
\n"); - } - } + printf("\n"); + printf("module\n"); + $i =3D 0; + while (list ($name, $val) =3D each ($results)) { + list($r,$t,$m,$d,$s,$u) =3D $val; + $m =3D str_replace("<", "<", $m); + $s =3D str_replace("<", "<", $s); + $d =3D str_replace("<", "<", $d); + echo "$t"; + $i =3D $i + 1; + if ($i > 75) + break; + } + printf("
QualitySymbolTypeDescription
$r$s$m$d
\n"); + } + } } ?> diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 3dd2d0822..d2b5f1fd4 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -39,8 +39,8 @@ extern "C" { */ typedef enum { VIR_ERR_NONE =3D 0, - VIR_ERR_WARNING =3D 1, /* A simple warning */ - VIR_ERR_ERROR =3D 2 /* An error */ + VIR_ERR_WARNING =3D 1, /* A simple warning */ + VIR_ERR_ERROR =3D 2 /* An error */ } virErrorLevel; =20 /** @@ -51,59 +51,59 @@ typedef enum { */ typedef enum { VIR_FROM_NONE =3D 0, - VIR_FROM_XEN =3D 1, /* Error at Xen hypervisor layer */ - VIR_FROM_XEND =3D 2, /* Error at connection with xend daemon */ - VIR_FROM_XENSTORE =3D 3, /* Error at connection with xen store */ - VIR_FROM_SEXPR =3D 4, /* Error in the S-Expression code */ + VIR_FROM_XEN =3D 1, /* Error at Xen hypervisor layer */ + VIR_FROM_XEND =3D 2, /* Error at connection with xend daemon = */ + VIR_FROM_XENSTORE =3D 3, /* Error at connection with xen store */ + VIR_FROM_SEXPR =3D 4, /* Error in the S-Expression code */ =20 - VIR_FROM_XML =3D 5, /* Error in the XML code */ - VIR_FROM_DOM =3D 6, /* Error when operating on a domain */ - VIR_FROM_RPC =3D 7, /* Error in the XML-RPC code */ - VIR_FROM_PROXY =3D 8, /* Error in the proxy code; unused since + VIR_FROM_XML =3D 5, /* Error in the XML code */ + VIR_FROM_DOM =3D 6, /* Error when operating on a domain */ + VIR_FROM_RPC =3D 7, /* Error in the XML-RPC code */ + VIR_FROM_PROXY =3D 8, /* Error in the proxy code; unused since 0.8.6 */ - VIR_FROM_CONF =3D 9, /* Error in the configuration file handling */ + VIR_FROM_CONF =3D 9, /* Error in the configuration file handl= ing */ =20 - VIR_FROM_QEMU =3D 10, /* Error at the QEMU daemon */ - VIR_FROM_NET =3D 11, /* Error when operating on a network */ - VIR_FROM_TEST =3D 12, /* Error from test driver */ - VIR_FROM_REMOTE =3D 13, /* Error from remote driver */ - VIR_FROM_OPENVZ =3D 14, /* Error from OpenVZ driver */ + VIR_FROM_QEMU =3D 10, /* Error at the QEMU daemon */ + VIR_FROM_NET =3D 11, /* Error when operating on a network */ + VIR_FROM_TEST =3D 12, /* Error from test driver */ + VIR_FROM_REMOTE =3D 13, /* Error from remote driver */ + VIR_FROM_OPENVZ =3D 14, /* Error from OpenVZ driver */ =20 - VIR_FROM_XENXM =3D 15, /* Error at Xen XM layer */ - VIR_FROM_STATS_LINUX =3D 16, /* Error in the Linux Stats code */ - VIR_FROM_LXC =3D 17, /* Error from Linux Container driver */ - VIR_FROM_STORAGE =3D 18, /* Error from storage driver */ - VIR_FROM_NETWORK =3D 19, /* Error from network config */ + VIR_FROM_XENXM =3D 15, /* Error at Xen XM layer */ + VIR_FROM_STATS_LINUX =3D 16, /* Error in the Linux Stats code */ + VIR_FROM_LXC =3D 17, /* Error from Linux Container driver */ + VIR_FROM_STORAGE =3D 18, /* Error from storage driver */ + VIR_FROM_NETWORK =3D 19, /* Error from network config */ =20 - VIR_FROM_DOMAIN =3D 20, /* Error from domain config */ - VIR_FROM_UML =3D 21, /* Error at the UML driver */ - VIR_FROM_NODEDEV =3D 22, /* Error from node device monitor */ - VIR_FROM_XEN_INOTIFY =3D 23, /* Error from xen inotify layer */ - VIR_FROM_SECURITY =3D 24, /* Error from security framework */ + VIR_FROM_DOMAIN =3D 20, /* Error from domain config */ + VIR_FROM_UML =3D 21, /* Error at the UML driver */ + VIR_FROM_NODEDEV =3D 22, /* Error from node device monitor */ + VIR_FROM_XEN_INOTIFY =3D 23, /* Error from xen inotify layer */ + VIR_FROM_SECURITY =3D 24, /* Error from security framework */ =20 - VIR_FROM_VBOX =3D 25, /* Error from VirtualBox driver */ - VIR_FROM_INTERFACE =3D 26, /* Error when operating on an interface */ - VIR_FROM_ONE =3D 27, /* The OpenNebula driver no longer exists. + VIR_FROM_VBOX =3D 25, /* Error from VirtualBox driver */ + VIR_FROM_INTERFACE =3D 26, /* Error when operating on an interface = */ + VIR_FROM_ONE =3D 27, /* The OpenNebula driver no longer exist= s. Retained for ABI/API compat only */ - VIR_FROM_ESX =3D 28, /* Error from ESX driver */ - VIR_FROM_PHYP =3D 29, /* Error from IBM power hypervisor */ + VIR_FROM_ESX =3D 28, /* Error from ESX driver */ + VIR_FROM_PHYP =3D 29, /* Error from IBM power hypervisor */ =20 - VIR_FROM_SECRET =3D 30, /* Error from secret storage */ - VIR_FROM_CPU =3D 31, /* Error from CPU driver */ - VIR_FROM_XENAPI =3D 32, /* Error from XenAPI */ - VIR_FROM_NWFILTER =3D 33, /* Error from network filter driver */ - VIR_FROM_HOOK =3D 34, /* Error from Synchronous hooks */ + VIR_FROM_SECRET =3D 30, /* Error from secret storage */ + VIR_FROM_CPU =3D 31, /* Error from CPU driver */ + VIR_FROM_XENAPI =3D 32, /* Error from XenAPI */ + VIR_FROM_NWFILTER =3D 33, /* Error from network filter driver */ + VIR_FROM_HOOK =3D 34, /* Error from Synchronous hooks */ =20 VIR_FROM_DOMAIN_SNAPSHOT =3D 35,/* Error from domain snapshot */ - VIR_FROM_AUDIT =3D 36, /* Error from auditing subsystem */ - VIR_FROM_SYSINFO =3D 37, /* Error from sysinfo/SMBIOS */ - VIR_FROM_STREAMS =3D 38, /* Error from I/O streams */ - VIR_FROM_VMWARE =3D 39, /* Error from VMware driver */ + VIR_FROM_AUDIT =3D 36, /* Error from auditing subsystem */ + VIR_FROM_SYSINFO =3D 37, /* Error from sysinfo/SMBIOS */ + VIR_FROM_STREAMS =3D 38, /* Error from I/O streams */ + VIR_FROM_VMWARE =3D 39, /* Error from VMware driver */ =20 - VIR_FROM_EVENT =3D 40, /* Error from event loop impl */ - VIR_FROM_LIBXL =3D 41, /* Error from libxenlight driver */ - VIR_FROM_LOCKING =3D 42, /* Error from lock manager */ - VIR_FROM_HYPERV =3D 43, /* Error from Hyper-V driver */ + VIR_FROM_EVENT =3D 40, /* Error from event loop impl */ + VIR_FROM_LIBXL =3D 41, /* Error from libxenlight driver */ + VIR_FROM_LOCKING =3D 42, /* Error from lock manager */ + VIR_FROM_HYPERV =3D 43, /* Error from Hyper-V driver */ VIR_FROM_CAPABILITIES =3D 44, /* Error from capabilities */ =20 VIR_FROM_URI =3D 45, /* Error from URI handling */ @@ -153,19 +153,19 @@ typedef enum { typedef struct _virError virError; typedef virError *virErrorPtr; struct _virError { - int code; /* The error code, a virErrorNumber */ - int domain; /* What part of the library raised this error */ + int code; /* The error code, a virErrorNumber */ + int domain; /* What part of the library raised this error */ char *message;/* human-readable informative error message */ virErrorLevel level;/* how consequent is the error */ virConnectPtr conn VIR_DEPRECATED; /* connection if available, depreca= ted see note above */ virDomainPtr dom VIR_DEPRECATED; /* domain if available, deprecated see note above */ - char *str1; /* extra string information */ - char *str2; /* extra string information */ - char *str3; /* extra string information */ - int int1; /* extra number information */ - int int2; /* extra number information */ + char *str1; /* extra string information */ + char *str2; /* extra string information */ + char *str3; /* extra string information */ + int int1; /* extra number information */ + int int2; /* extra number information */ virNetworkPtr net VIR_DEPRECATED; /* network if available, deprecated see note above */ }; @@ -204,94 +204,94 @@ struct _virError { */ typedef enum { VIR_ERR_OK =3D 0, - VIR_ERR_INTERNAL_ERROR =3D 1, /* internal error */ - VIR_ERR_NO_MEMORY =3D 2, /* memory allocation failure */ - VIR_ERR_NO_SUPPORT =3D 3, /* no support for this function */ - VIR_ERR_UNKNOWN_HOST =3D 4, /* could not resolve hostname */ - VIR_ERR_NO_CONNECT =3D 5, /* can't connect to hypervisor */ - VIR_ERR_INVALID_CONN =3D 6, /* invalid connection object */ - VIR_ERR_INVALID_DOMAIN =3D 7, /* invalid domain object */ - VIR_ERR_INVALID_ARG =3D 8, /* invalid function argument */ - VIR_ERR_OPERATION_FAILED =3D 9, /* a command to hypervisor failed */ - VIR_ERR_GET_FAILED =3D 10, /* a HTTP GET command to failed */ - VIR_ERR_POST_FAILED =3D 11, /* a HTTP POST command to failed */ - VIR_ERR_HTTP_ERROR =3D 12, /* unexpected HTTP error code */ - VIR_ERR_SEXPR_SERIAL =3D 13, /* failure to serialize an S-Expr */ - VIR_ERR_NO_XEN =3D 14, /* could not open Xen hypervisor + VIR_ERR_INTERNAL_ERROR =3D 1, /* internal error */ + VIR_ERR_NO_MEMORY =3D 2, /* memory allocation failure */ + VIR_ERR_NO_SUPPORT =3D 3, /* no support for this function = */ + VIR_ERR_UNKNOWN_HOST =3D 4, /* could not resolve hostname */ + VIR_ERR_NO_CONNECT =3D 5, /* can't connect to hypervisor */ + VIR_ERR_INVALID_CONN =3D 6, /* invalid connection object */ + VIR_ERR_INVALID_DOMAIN =3D 7, /* invalid domain object */ + VIR_ERR_INVALID_ARG =3D 8, /* invalid function argument */ + VIR_ERR_OPERATION_FAILED =3D 9, /* a command to hypervisor faile= d */ + VIR_ERR_GET_FAILED =3D 10, /* a HTTP GET command to failed = */ + VIR_ERR_POST_FAILED =3D 11, /* a HTTP POST command to failed= */ + VIR_ERR_HTTP_ERROR =3D 12, /* unexpected HTTP error code */ + VIR_ERR_SEXPR_SERIAL =3D 13, /* failure to serialize an S-Exp= r */ + VIR_ERR_NO_XEN =3D 14, /* could not open Xen hypervisor control */ - VIR_ERR_XEN_CALL =3D 15, /* failure doing an hypervisor call */ - VIR_ERR_OS_TYPE =3D 16, /* unknown OS type */ - VIR_ERR_NO_KERNEL =3D 17, /* missing kernel information */ - VIR_ERR_NO_ROOT =3D 18, /* missing root device information */ - VIR_ERR_NO_SOURCE =3D 19, /* missing source device information */ - VIR_ERR_NO_TARGET =3D 20, /* missing target device information */ - VIR_ERR_NO_NAME =3D 21, /* missing domain name information */ - VIR_ERR_NO_OS =3D 22, /* missing domain OS information */ - VIR_ERR_NO_DEVICE =3D 23, /* missing domain devices information */ - VIR_ERR_NO_XENSTORE =3D 24, /* could not open Xen Store control */ - VIR_ERR_DRIVER_FULL =3D 25, /* too many drivers registered */ - VIR_ERR_CALL_FAILED =3D 26, /* not supported by the drivers + VIR_ERR_XEN_CALL =3D 15, /* failure doing an hypervisor c= all */ + VIR_ERR_OS_TYPE =3D 16, /* unknown OS type */ + VIR_ERR_NO_KERNEL =3D 17, /* missing kernel information */ + VIR_ERR_NO_ROOT =3D 18, /* missing root device informati= on */ + VIR_ERR_NO_SOURCE =3D 19, /* missing source device informa= tion */ + VIR_ERR_NO_TARGET =3D 20, /* missing target device informa= tion */ + VIR_ERR_NO_NAME =3D 21, /* missing domain name informati= on */ + VIR_ERR_NO_OS =3D 22, /* missing domain OS information= */ + VIR_ERR_NO_DEVICE =3D 23, /* missing domain devices inform= ation */ + VIR_ERR_NO_XENSTORE =3D 24, /* could not open Xen Store cont= rol */ + VIR_ERR_DRIVER_FULL =3D 25, /* too many drivers registered */ + VIR_ERR_CALL_FAILED =3D 26, /* not supported by the drivers (DEPRECATED) */ - VIR_ERR_XML_ERROR =3D 27, /* an XML description is not well + VIR_ERR_XML_ERROR =3D 27, /* an XML description is not well formed or broken */ - VIR_ERR_DOM_EXIST =3D 28, /* the domain already exist */ - VIR_ERR_OPERATION_DENIED =3D 29, /* operation forbidden on read-only + VIR_ERR_DOM_EXIST =3D 28, /* the domain already exist */ + VIR_ERR_OPERATION_DENIED =3D 29, /* operation forbidden on read-o= nly connections */ - VIR_ERR_OPEN_FAILED =3D 30, /* failed to open a conf file */ - VIR_ERR_READ_FAILED =3D 31, /* failed to read a conf file */ - VIR_ERR_PARSE_FAILED =3D 32, /* failed to parse a conf file */ - VIR_ERR_CONF_SYNTAX =3D 33, /* failed to parse the syntax of a + VIR_ERR_OPEN_FAILED =3D 30, /* failed to open a conf file */ + VIR_ERR_READ_FAILED =3D 31, /* failed to read a conf file */ + VIR_ERR_PARSE_FAILED =3D 32, /* failed to parse a conf file */ + VIR_ERR_CONF_SYNTAX =3D 33, /* failed to parse the syntax of= a conf file */ - VIR_ERR_WRITE_FAILED =3D 34, /* failed to write a conf file */ - VIR_ERR_XML_DETAIL =3D 35, /* detail of an XML error */ - VIR_ERR_INVALID_NETWORK =3D 36, /* invalid network object */ - VIR_ERR_NETWORK_EXIST =3D 37, /* the network already exist */ - VIR_ERR_SYSTEM_ERROR =3D 38, /* general system call failure */ - VIR_ERR_RPC =3D 39, /* some sort of RPC error */ - VIR_ERR_GNUTLS_ERROR =3D 40, /* error from a GNUTLS call */ - VIR_WAR_NO_NETWORK =3D 41, /* failed to start network */ - VIR_ERR_NO_DOMAIN =3D 42, /* domain not found or unexpectedly + VIR_ERR_WRITE_FAILED =3D 34, /* failed to write a conf file */ + VIR_ERR_XML_DETAIL =3D 35, /* detail of an XML error */ + VIR_ERR_INVALID_NETWORK =3D 36, /* invalid network object */ + VIR_ERR_NETWORK_EXIST =3D 37, /* the network already exist */ + VIR_ERR_SYSTEM_ERROR =3D 38, /* general system call failure */ + VIR_ERR_RPC =3D 39, /* some sort of RPC error */ + VIR_ERR_GNUTLS_ERROR =3D 40, /* error from a GNUTLS call */ + VIR_WAR_NO_NETWORK =3D 41, /* failed to start network */ + VIR_ERR_NO_DOMAIN =3D 42, /* domain not found or unexpecte= dly disappeared */ - VIR_ERR_NO_NETWORK =3D 43, /* network not found */ - VIR_ERR_INVALID_MAC =3D 44, /* invalid MAC address */ - VIR_ERR_AUTH_FAILED =3D 45, /* authentication failed */ - VIR_ERR_INVALID_STORAGE_POOL =3D 46, /* invalid storage pool object */ - VIR_ERR_INVALID_STORAGE_VOL =3D 47, /* invalid storage vol object */ - VIR_WAR_NO_STORAGE =3D 48, /* failed to start storage */ - VIR_ERR_NO_STORAGE_POOL =3D 49, /* storage pool not found */ - VIR_ERR_NO_STORAGE_VOL =3D 50, /* storage volume not found */ - VIR_WAR_NO_NODE =3D 51, /* failed to start node driver */ - VIR_ERR_INVALID_NODE_DEVICE =3D 52, /* invalid node device object */ - VIR_ERR_NO_NODE_DEVICE =3D 53, /* node device not found */ - VIR_ERR_NO_SECURITY_MODEL =3D 54, /* security model not found */ - VIR_ERR_OPERATION_INVALID =3D 55, /* operation is not applicable at th= is + VIR_ERR_NO_NETWORK =3D 43, /* network not found */ + VIR_ERR_INVALID_MAC =3D 44, /* invalid MAC address */ + VIR_ERR_AUTH_FAILED =3D 45, /* authentication failed */ + VIR_ERR_INVALID_STORAGE_POOL =3D 46, /* invalid storage pool object */ + VIR_ERR_INVALID_STORAGE_VOL =3D 47, /* invalid storage vol object */ + VIR_WAR_NO_STORAGE =3D 48, /* failed to start storage */ + VIR_ERR_NO_STORAGE_POOL =3D 49, /* storage pool not found */ + VIR_ERR_NO_STORAGE_VOL =3D 50, /* storage volume not found */ + VIR_WAR_NO_NODE =3D 51, /* failed to start node driver */ + VIR_ERR_INVALID_NODE_DEVICE =3D 52, /* invalid node device object */ + VIR_ERR_NO_NODE_DEVICE =3D 53, /* node device not found */ + VIR_ERR_NO_SECURITY_MODEL =3D 54, /* security model not found */ + VIR_ERR_OPERATION_INVALID =3D 55, /* operation is not applicable a= t this time */ - VIR_WAR_NO_INTERFACE =3D 56, /* failed to start interface driver */ - VIR_ERR_NO_INTERFACE =3D 57, /* interface driver not running */ - VIR_ERR_INVALID_INTERFACE =3D 58, /* invalid interface object */ - VIR_ERR_MULTIPLE_INTERFACES =3D 59, /* more than one matching interface + VIR_WAR_NO_INTERFACE =3D 56, /* failed to start interface dri= ver */ + VIR_ERR_NO_INTERFACE =3D 57, /* interface driver not running = */ + VIR_ERR_INVALID_INTERFACE =3D 58, /* invalid interface object */ + VIR_ERR_MULTIPLE_INTERFACES =3D 59, /* more than one matching interf= ace found */ - VIR_WAR_NO_NWFILTER =3D 60, /* failed to start nwfilter driver */ - VIR_ERR_INVALID_NWFILTER =3D 61, /* invalid nwfilter object */ - VIR_ERR_NO_NWFILTER =3D 62, /* nw filter pool not found */ - VIR_ERR_BUILD_FIREWALL =3D 63, /* nw filter pool not found */ - VIR_WAR_NO_SECRET =3D 64, /* failed to start secret storage */ - VIR_ERR_INVALID_SECRET =3D 65, /* invalid secret */ - VIR_ERR_NO_SECRET =3D 66, /* secret not found */ - VIR_ERR_CONFIG_UNSUPPORTED =3D 67, /* unsupported configuration + VIR_WAR_NO_NWFILTER =3D 60, /* failed to start nwfilter driv= er */ + VIR_ERR_INVALID_NWFILTER =3D 61, /* invalid nwfilter object */ + VIR_ERR_NO_NWFILTER =3D 62, /* nw filter pool not found */ + VIR_ERR_BUILD_FIREWALL =3D 63, /* nw filter pool not found */ + VIR_WAR_NO_SECRET =3D 64, /* failed to start secret storag= e */ + VIR_ERR_INVALID_SECRET =3D 65, /* invalid secret */ + VIR_ERR_NO_SECRET =3D 66, /* secret not found */ + VIR_ERR_CONFIG_UNSUPPORTED =3D 67, /* unsupported configuration construct */ - VIR_ERR_OPERATION_TIMEOUT =3D 68, /* timeout occurred during operation= */ + VIR_ERR_OPERATION_TIMEOUT =3D 68, /* timeout occurred during opera= tion */ VIR_ERR_MIGRATE_PERSIST_FAILED =3D 69,/* a migration worked, but makin= g the VM persist on the dest host fai= led */ - VIR_ERR_HOOK_SCRIPT_FAILED =3D 70, /* a synchronous hook script failed= */ + VIR_ERR_HOOK_SCRIPT_FAILED =3D 70, /* a synchronous hook script fai= led */ VIR_ERR_INVALID_DOMAIN_SNAPSHOT =3D 71,/* invalid domain snapshot */ - VIR_ERR_NO_DOMAIN_SNAPSHOT =3D 72, /* domain snapshot not found */ - VIR_ERR_INVALID_STREAM =3D 73, /* stream pointer not valid */ - VIR_ERR_ARGUMENT_UNSUPPORTED =3D 74, /* valid API use but unsupported = by + VIR_ERR_NO_DOMAIN_SNAPSHOT =3D 72, /* domain snapshot not found */ + VIR_ERR_INVALID_STREAM =3D 73, /* stream pointer not valid */ + VIR_ERR_ARGUMENT_UNSUPPORTED =3D 74, /* valid API use but unsupported= by the given driver */ - VIR_ERR_STORAGE_PROBE_FAILED =3D 75, /* storage pool probe failed */ - VIR_ERR_STORAGE_POOL_BUILT =3D 76, /* storage pool already built */ - VIR_ERR_SNAPSHOT_REVERT_RISKY =3D 77, /* force was not requested for a + VIR_ERR_STORAGE_PROBE_FAILED =3D 75, /* storage pool probe failed */ + VIR_ERR_STORAGE_POOL_BUILT =3D 76, /* storage pool already built */ + VIR_ERR_SNAPSHOT_REVERT_RISKY =3D 77, /* force was not requested for a risky domain snapshot revert */ VIR_ERR_OPERATION_ABORTED =3D 78, /* operation on a domain was canceled/aborted by user */ @@ -314,7 +314,7 @@ typedef enum { CPU*/ VIR_ERR_XML_INVALID_SCHEMA =3D 92, /* XML document doesn't validate= against schema */ VIR_ERR_MIGRATE_FINISH_OK =3D 93, /* Finish API succeeded but it i= s expected to return NULL */ - VIR_ERR_AUTH_UNAVAILABLE =3D 94, /* authentication unavailable */ + VIR_ERR_AUTH_UNAVAILABLE =3D 94, /* authentication unavailable */ VIR_ERR_NO_SERVER =3D 95, /* Server was not found */ VIR_ERR_NO_CLIENT =3D 96, /* Client was not found */ VIR_ERR_AGENT_UNSYNCED =3D 97, /* guest agent replies with wron= g id @@ -337,25 +337,25 @@ typedef void (*virErrorFunc) (void *userData, virErro= rPtr error); * at the connection level (which then has priority). */ =20 -virErrorPtr virGetLastError (void); -virErrorPtr virSaveLastError (void); -void virResetLastError (void); -void virResetError (virErrorPtr err); -void virFreeError (virErrorPtr err); +virErrorPtr virGetLastError (void); +virErrorPtr virSaveLastError (void); +void virResetLastError (void); +void virResetError (virErrorPtr err); +void virFreeError (virErrorPtr err); =20 const char * virGetLastErrorMessage (void); =20 -virErrorPtr virConnGetLastError (virConnectPtr conn); -void virConnResetLastError (virConnectPtr conn); -int virCopyLastError (virErrorPtr to); +virErrorPtr virConnGetLastError (virConnectPtr conn); +void virConnResetLastError (virConnectPtr conn); +int virCopyLastError (virErrorPtr to); =20 -void virDefaultErrorFunc (virErrorPtr err); -void virSetErrorFunc (void *userData, +void virDefaultErrorFunc (virErrorPtr err); +void virSetErrorFunc (void *userData, virErrorFunc handler); -void virConnSetErrorFunc (virConnectPtr conn, +void virConnSetErrorFunc (virConnectPtr conn, void *userData, virErrorFunc handler); -int virConnCopyLastError (virConnectPtr conn, +int virConnCopyLastError (virConnectPtr conn, virErrorPtr to); # ifdef __cplusplus } diff --git a/src/bhyve/bhyve_monitor.c b/src/bhyve/bhyve_monitor.c index 37c9e7914..852483452 100644 --- a/src/bhyve/bhyve_monitor.c +++ b/src/bhyve/bhyve_monitor.c @@ -35,7 +35,7 @@ #include "virfile.h" #include "virlog.h" =20 -#define VIR_FROM_THIS VIR_FROM_BHYVE +#define VIR_FROM_THIS VIR_FROM_BHYVE =20 VIR_LOG_INIT("bhyve.bhyve_monitor"); =20 diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index 7211156ca..5076246aa 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -49,7 +49,7 @@ #include "virnetdevbridge.h" #include "virnetdevtap.h" =20 -#define VIR_FROM_THIS VIR_FROM_BHYVE +#define VIR_FROM_THIS VIR_FROM_BHYVE =20 VIR_LOG_INIT("bhyve.bhyve_process"); =20 diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index da56eaffa..cf79773aa 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -51,17 +51,17 @@ VIR_ENUM_DECL(virNodeDevDevnode) =20 typedef enum { /* Keep in sync with VIR_ENUM_IMPL in node_device_conf.c */ - VIR_NODE_DEV_CAP_SYSTEM, /* System capability */ - VIR_NODE_DEV_CAP_PCI_DEV, /* PCI device */ - VIR_NODE_DEV_CAP_USB_DEV, /* USB device */ - VIR_NODE_DEV_CAP_USB_INTERFACE, /* USB interface */ - VIR_NODE_DEV_CAP_NET, /* Network device */ - VIR_NODE_DEV_CAP_SCSI_HOST, /* SCSI Host Bus Adapter */ - VIR_NODE_DEV_CAP_SCSI_TARGET, /* SCSI Target */ - VIR_NODE_DEV_CAP_SCSI, /* SCSI device */ - VIR_NODE_DEV_CAP_STORAGE, /* Storage device */ - VIR_NODE_DEV_CAP_FC_HOST, /* FC Host Bus Adapter */ - VIR_NODE_DEV_CAP_VPORTS, /* HBA which is capable of vports */ + VIR_NODE_DEV_CAP_SYSTEM, /* System capability */ + VIR_NODE_DEV_CAP_PCI_DEV, /* PCI device */ + VIR_NODE_DEV_CAP_USB_DEV, /* USB device */ + VIR_NODE_DEV_CAP_USB_INTERFACE, /* USB interface */ + VIR_NODE_DEV_CAP_NET, /* Network device */ + VIR_NODE_DEV_CAP_SCSI_HOST, /* SCSI Host Bus Adapter */ + VIR_NODE_DEV_CAP_SCSI_TARGET, /* SCSI Target */ + VIR_NODE_DEV_CAP_SCSI, /* SCSI device */ + VIR_NODE_DEV_CAP_STORAGE, /* Storage device */ + VIR_NODE_DEV_CAP_FC_HOST, /* FC Host Bus Adapter */ + VIR_NODE_DEV_CAP_VPORTS, /* HBA which is capable of vports = */ VIR_NODE_DEV_CAP_SCSI_GENERIC, /* SCSI generic device */ VIR_NODE_DEV_CAP_DRM, /* DRM device */ VIR_NODE_DEV_CAP_MDEV_TYPES, /* Device capable of mediated devi= ces */ @@ -73,8 +73,8 @@ typedef enum { =20 typedef enum { /* Keep in sync with VIR_ENUM_IMPL in node_device_conf.c */ - VIR_NODE_DEV_CAP_NET_80203, /* 802.03 network device */ - VIR_NODE_DEV_CAP_NET_80211, /* 802.11 network device */ + VIR_NODE_DEV_CAP_NET_80203, /* 802.03 network device */ + VIR_NODE_DEV_CAP_NET_80211, /* 802.11 network device */ VIR_NODE_DEV_CAP_NET_LAST } virNodeDevNetCapType; =20 @@ -82,18 +82,18 @@ VIR_ENUM_DECL(virNodeDevCap) VIR_ENUM_DECL(virNodeDevNetCap) =20 typedef enum { - VIR_NODE_DEV_CAP_STORAGE_REMOVABLE =3D (1 << 0), - VIR_NODE_DEV_CAP_STORAGE_REMOVABLE_MEDIA_AVAILABLE =3D (1 << 1), - VIR_NODE_DEV_CAP_STORAGE_HOTPLUGGABLE =3D (1 << 2), + VIR_NODE_DEV_CAP_STORAGE_REMOVABLE =3D (1 << 0), + VIR_NODE_DEV_CAP_STORAGE_REMOVABLE_MEDIA_AVAILABLE =3D (1 << 1), + VIR_NODE_DEV_CAP_STORAGE_HOTPLUGGABLE =3D (1 << 2), } virNodeDevStorageCapFlags; =20 typedef enum { - VIR_NODE_DEV_CAP_FLAG_HBA_FC_HOST =3D (1 << 0), - VIR_NODE_DEV_CAP_FLAG_HBA_VPORT_OPS =3D (1 << 1), + VIR_NODE_DEV_CAP_FLAG_HBA_FC_HOST =3D (1 << 0), + VIR_NODE_DEV_CAP_FLAG_HBA_VPORT_OPS =3D (1 << 1), } virNodeDevSCSIHostCapFlags; =20 typedef enum { - VIR_NODE_DEV_CAP_FLAG_FC_RPORT =3D (1 << 0), + VIR_NODE_DEV_CAP_FLAG_FC_RPORT =3D (1 << 0), } virNodeDevSCSITargetCapsFlags; =20 typedef enum { @@ -197,7 +197,7 @@ typedef struct _virNodeDevCapUSBIf virNodeDevCapUSBIf; typedef virNodeDevCapUSBIf *virNodeDevCapUSBIfPtr; struct _virNodeDevCapUSBIf { unsigned int number; - unsigned int _class; /* "class" is reserved in C */ + unsigned int _class; /* "class" is reserved in C */ unsigned int subclass; unsigned int protocol; char *description; @@ -260,7 +260,7 @@ struct _virNodeDevCapStorage { char *vendor; char *serial; char *media_label; - unsigned int flags; /* virNodeDevStorageCapFlags bits */ + unsigned int flags; /* virNodeDevStorageCapFlags bits */ }; =20 typedef struct _virNodeDevCapSCSIGeneric virNodeDevCapSCSIGeneric; @@ -317,15 +317,15 @@ typedef virNodeDeviceDef *virNodeDeviceDefPtr; struct _virNodeDeviceDef { char *name; /* device name (unique on node) */ char *sysfs_path; /* udev name/sysfs path */ - char *parent; /* optional parent device name */ + char *parent; /* optional parent device name */ char *parent_sysfs_path; /* udev parent name/sysfs path */ - char *parent_wwnn; /* optional parent wwnn */ - char *parent_wwpn; /* optional parent wwpn */ - char *parent_fabric_wwn; /* optional parent fabric_wwn */ + char *parent_wwnn; /* optional parent wwnn */ + char *parent_wwpn; /* optional parent wwpn */ + char *parent_fabric_wwn; /* optional parent fabric_wwn */ char *driver; /* optional driver name */ char *devnode; /* /dev path */ char **devlinks; /* /dev links */ - virNodeDevCapsDefPtr caps; /* optional device capabilities */ + virNodeDevCapsDefPtr caps; /* optional device capabilities */ }; =20 char * diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h index 4bf5b7c0c..eeec10e67 100644 --- a/src/conf/nwfilter_conf.h +++ b/src/conf/nwfilter_conf.h @@ -66,7 +66,7 @@ * terminating '0' =3D * 32-3-15-1-1 =3D 12 */ -# define MAX_CHAIN_SUFFIX_SIZE 12 +# define MAX_CHAIN_SUFFIX_SIZE 12 =20 =20 typedef enum { diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index b0dcee16f..19145bb07 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -36,7 +36,7 @@ VIR_LOG_INIT("conf.virnodedeviceobj"); struct _virNodeDeviceObj { virObjectLockable parent; =20 - virNodeDeviceDefPtr def; /* device definition */ + virNodeDeviceDefPtr def; /* device definition */ }; =20 struct _virNodeDeviceObjList { diff --git a/src/conf/virnodedeviceobj.h b/src/conf/virnodedeviceobj.h index 63917eb75..e7c26abbd 100644 --- a/src/conf/virnodedeviceobj.h +++ b/src/conf/virnodedeviceobj.h @@ -38,8 +38,8 @@ typedef virNodeDeviceDriverState *virNodeDeviceDriverStat= ePtr; struct _virNodeDeviceDriverState { virMutex lock; =20 - virNodeDeviceObjListPtr devs; /* currently-known devices */ - void *privateData; /* driver-specific private data */ + virNodeDeviceObjListPtr devs; /* currently-known devices */ + void *privateData; /* driver-specific private data */ =20 /* Immutable pointer, self-locking APIs */ virObjectEventStatePtr nodeDeviceEventState; diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 00226a3fc..34e3dc412 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -325,10 +325,10 @@ struct _qemuDomainObjPrivate { virTristateBool reconnectBlockjobs; }; =20 -# define QEMU_DOMAIN_PRIVATE(vm) \ +# define QEMU_DOMAIN_PRIVATE(vm) \ ((qemuDomainObjPrivatePtr) (vm)->privateData) =20 -# define QEMU_DOMAIN_DISK_PRIVATE(disk) \ +# define QEMU_DOMAIN_DISK_PRIVATE(disk) \ ((qemuDomainDiskPrivatePtr) (disk)->privateData) =20 typedef struct _qemuDomainDiskPrivate qemuDomainDiskPrivate; @@ -362,7 +362,7 @@ struct _qemuDomainDiskPrivate { bool removable; /* device media can be removed/changed */ }; =20 -# define QEMU_DOMAIN_HOSTDEV_PRIVATE(hostdev) \ +# define QEMU_DOMAIN_HOSTDEV_PRIVATE(hostdev) \ ((qemuDomainHostdevPrivatePtr) (hostdev)->privateData) =20 =20 @@ -410,7 +410,7 @@ struct _qemuDomainHostdevPrivate { qemuDomainSecretInfoPtr secinfo; }; =20 -# define QEMU_DOMAIN_CHR_SOURCE_PRIVATE(dev) \ +# define QEMU_DOMAIN_CHR_SOURCE_PRIVATE(dev) \ ((qemuDomainChrSourcePrivatePtr) (dev)->privateData) =20 typedef struct _qemuDomainChrSourcePrivate qemuDomainChrSourcePrivate; diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 1647b4697..89f8a19ef 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -723,7 +723,7 @@ int qemuMonitorGetGICCapabilities(qemuMonitorPtr mon, virGICCapability **capabilities); =20 typedef enum { - QEMU_MONITOR_MIGRATE_BACKGROUND =3D 1 << 0, + QEMU_MONITOR_MIGRATE_BACKGROUND =3D 1 << 0, QEMU_MONITOR_MIGRATE_NON_SHARED_DISK =3D 1 << 1, /* migration with non-= shared storage with full disk copy */ QEMU_MONITOR_MIGRATE_NON_SHARED_INC =3D 1 << 2, /* migration with non-= shared storage with incremental copy */ QEMU_MONITOR_MIGRATION_FLAGS_LAST diff --git a/src/util/viraudit.h b/src/util/viraudit.h index 861cbf691..edaddf3c8 100644 --- a/src/util/viraudit.h +++ b/src/util/viraudit.h @@ -47,11 +47,11 @@ char *virAuditEncode(const char *key, const char *value= ); =20 void virAuditClose(void); =20 -# define VIR_AUDIT(type, success, ...) \ +# define VIR_AUDIT(type, success, ...) \ virAuditSend(&virLogSelf, __FILE__, __LINE__, __func__, \ NULL, NULL, type, success, __VA_ARGS__); =20 -# define VIR_AUDIT_USER(type, success, clienttty, clientaddr, ...) \ +# define VIR_AUDIT_USER(type, success, clienttty, clientaddr, ...) \ virAuditSend(&virLogSelf, __FILE__, __LINE__, __func__, \ clienttty, clientaddr, type, success, __VA_ARGS__); =20 diff --git a/src/util/virconf.c b/src/util/virconf.c index e505848f1..a88cc9901 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -45,9 +45,9 @@ VIR_LOG_INIT("util.conf"); =20 /************************************************************************ - * * - * Structures and macros used by the mini parser * - * * + * * + * Structures and macros used by the mini parser * + * * ************************************************************************/ =20 typedef struct _virConfParserCtxt virConfParserCtxt; @@ -69,16 +69,16 @@ struct _virConfParserCtxt { =20 #define SKIP_BLANKS_AND_EOL \ do { while ((ctxt->cur < ctxt->end) && (c_isblank(CUR) || IS_EOL(CUR))) = { \ - if (CUR =3D=3D '\n') ctxt->line++; = \ + if (CUR =3D=3D '\n') ctxt->line++; = \ ctxt->cur++; } } while (0) #define SKIP_BLANKS \ do { while ((ctxt->cur < ctxt->end) && (c_isblank(CUR))) \ ctxt->cur++; } while (0) =20 /************************************************************************ - * * - * Structures used by configuration data * - * * + * * + * Structures used by configuration data * + * * ************************************************************************/ =20 VIR_ENUM_IMPL(virConf, VIR_CONF_LAST, @@ -134,9 +134,9 @@ virConfErrorHelper(const char *file, const char *func, = size_t line, =20 =20 /************************************************************************ - * * - * Structures allocations and deallocations * - * * + * * + * Structures allocations and deallocations * + * * ************************************************************************/ =20 /** @@ -261,9 +261,9 @@ virConfAddEntry(virConfPtr conf, char *name, virConfVal= uePtr value, char *comm) } =20 /************************************************************************ - * * - * Serialization * - * * + * * + * Serialization * + * * ************************************************************************/ =20 /** @@ -354,9 +354,9 @@ virConfSaveEntry(virBufferPtr buf, virConfEntryPtr cur) } =20 /************************************************************************ - * * - * The parser core * - * * + * * + * The parser core * + * * ************************************************************************/ =20 /** @@ -755,9 +755,9 @@ virConfParse(const char *filename, const char *content,= int len, } =20 /************************************************************************ - * * - * The module entry points * - * * + * * + * The module entry points * + * * ************************************************************************/ =20 /* 10 MB limit on config file size as a sanity check */ diff --git a/src/util/virconf.h b/src/util/virconf.h index f7d9a369c..c672ad645 100644 --- a/src/util/virconf.h +++ b/src/util/virconf.h @@ -59,11 +59,11 @@ typedef struct _virConfValue virConfValue; typedef virConfValue *virConfValuePtr; =20 struct _virConfValue { - virConfType type; /* the virConfType */ - virConfValuePtr next; /* next element if in a list */ - long long l; /* very long integer */ - char *str; /* pointer to 0 terminated string */ - virConfValuePtr list; /* list of a list */ + virConfType type; /* the virConfType */ + virConfValuePtr next; /* next element if in a list */ + long long l; /* very long integer */ + char *str; /* pointer to 0 terminated string */ + virConfValuePtr list; /* list of a list */ }; =20 /** diff --git a/src/util/virerror.h b/src/util/virerror.h index 54530d081..054f50fd7 100644 --- a/src/util/virerror.h +++ b/src/util/virerror.h @@ -28,9 +28,9 @@ extern virErrorFunc virErrorHandler; extern void *virUserData; =20 /************************************************************************ - * * - * API for error handling * - * * + * * + * API for error handling * + * * ************************************************************************/ int virErrorInitialize(void); void virRaiseErrorFull(const char *filename, diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 650216d00..8e40b2b5c 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -53,7 +53,7 @@ static const char *sysinfoCpuinfo =3D "/proc/cpuinfo"; #define SYSINFO_SMBIOS_DECODER sysinfoDmidecode #define SYSINFO sysinfoSysinfo #define CPUINFO sysinfoCpuinfo -#define CPUINFO_FILE_LEN (1024*1024) /* 1MB limit for /proc/cpuinfo file */ +#define CPUINFO_FILE_LEN (1024*1024) /* 1MB limit for /proc/cpuinfo fil= e */ =20 =20 void diff --git a/src/util/virxml.c b/src/util/virxml.c index 885f59bce..a7c28b1e3 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -51,9 +51,9 @@ struct virParserData { =20 =20 /************************************************************************ - * * - * Wrappers around libxml2 XPath specific functions * - * * + * * + * Wrappers around libxml2 XPath specific functions * + * * ************************************************************************/ =20 /** @@ -704,7 +704,7 @@ catchXMLError(void *ctx, const char *msg ATTRIBUTE_UNUS= ED, ...) xmlParserCtxtPtr ctxt =3D (xmlParserCtxtPtr) ctx; =20 const xmlChar *cur, *base; - unsigned int n, col; /* GCC warns if signed, because compared with siz= eof() */ + unsigned int n, col; /* GCC warns if signed, because compared w= ith sizeof() */ int domcode =3D VIR_FROM_XML; =20 virBuffer buf =3D VIR_BUFFER_INITIALIZER; diff --git a/src/xen/xen_driver.h b/src/xen/xen_driver.h index 5015b31c7..7ebda8f5e 100644 --- a/src/xen/xen_driver.h +++ b/src/xen/xen_driver.h @@ -121,7 +121,7 @@ struct _xenUnifiedPrivate { */ virCapsPtr caps; virDomainXMLOptionPtr xmlopt; - int handle; /* Xen hypervisor handle */ + int handle; /* Xen hypervisor handle */ =20 /* connection to xend */ struct sockaddr_storage addr; diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index 70fdcbe55..7db61fade 100644 --- a/src/xen/xen_hypervisor.c +++ b/src/xen/xen_hypervisor.c @@ -170,15 +170,15 @@ static regex_t xen_cap_rec; # define SHUTDOWN_crash 3 /* Tell controller we've crashed. = */ #endif =20 -#define XEN_V0_OP_GETDOMAININFOLIST 38 -#define XEN_V1_OP_GETDOMAININFOLIST 38 -#define XEN_V2_OP_GETDOMAININFOLIST 6 +#define XEN_V0_OP_GETDOMAININFOLIST 38 +#define XEN_V1_OP_GETDOMAININFOLIST 38 +#define XEN_V2_OP_GETDOMAININFOLIST 6 =20 struct xen_v0_getdomaininfo { - domid_t domain; /* the domain number */ - uint32_t flags; /* flags, see before */ - uint64_t tot_pages; /* total number of pages used */ - uint64_t max_pages; /* maximum number of pages allowed */ + domid_t domain; /* the domain number */ + uint32_t flags; /* flags, see before */ + uint64_t tot_pages; /* total number of pages used */ + uint64_t max_pages; /* maximum number of pages allowed */ unsigned long shared_info_frame; /* MFN of shared_info struct */ uint64_t cpu_time; /* CPU time used */ uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */ @@ -189,10 +189,10 @@ struct xen_v0_getdomaininfo { typedef struct xen_v0_getdomaininfo xen_v0_getdomaininfo; =20 struct xen_v2_getdomaininfo { - domid_t domain; /* the domain number */ - uint32_t flags; /* flags, see before */ - uint64_t tot_pages; /* total number of pages used */ - uint64_t max_pages; /* maximum number of pages allowed */ + domid_t domain; /* the domain number */ + uint32_t flags; /* flags, see before */ + uint64_t tot_pages; /* total number of pages used */ + uint64_t max_pages; /* maximum number of pages allowed */ uint64_t shared_info_frame; /* MFN of shared_info struct */ uint64_t cpu_time; /* CPU time used */ uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */ @@ -208,10 +208,10 @@ typedef struct xen_v2_getdomaininfo xen_v2_getdomaini= nfo; #define ALIGN_64 __attribute__((aligned(8))) =20 struct xen_v2d5_getdomaininfo { - domid_t domain; /* the domain number */ - uint32_t flags; /* flags, see before */ - uint64_t tot_pages ALIGN_64; /* total number of pages used */ - uint64_t max_pages ALIGN_64; /* maximum number of pages allowed */ + domid_t domain; /* the domain number */ + uint32_t flags; /* flags, see before */ + uint64_t tot_pages ALIGN_64; /* total number of pages used */ + uint64_t max_pages ALIGN_64; /* maximum number of pages allowed= */ uint64_t shared_info_frame ALIGN_64; /* MFN of shared_info struct */ uint64_t cpu_time ALIGN_64; /* CPU time used */ uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */ @@ -222,10 +222,10 @@ struct xen_v2d5_getdomaininfo { typedef struct xen_v2d5_getdomaininfo xen_v2d5_getdomaininfo; =20 struct xen_v2d6_getdomaininfo { - domid_t domain; /* the domain number */ - uint32_t flags; /* flags, see before */ - uint64_t tot_pages ALIGN_64; /* total number of pages used */ - uint64_t max_pages ALIGN_64; /* maximum number of pages allowed */ + domid_t domain; /* the domain number */ + uint32_t flags; /* flags, see before */ + uint64_t tot_pages ALIGN_64; /* total number of pages used */ + uint64_t max_pages ALIGN_64; /* maximum number of pages allowed= */ uint64_t shr_pages ALIGN_64; /* number of shared pages */ uint64_t shared_info_frame ALIGN_64; /* MFN of shared_info struct */ uint64_t cpu_time ALIGN_64; /* CPU time used */ @@ -237,10 +237,10 @@ struct xen_v2d6_getdomaininfo { typedef struct xen_v2d6_getdomaininfo xen_v2d6_getdomaininfo; =20 struct xen_v2d7_getdomaininfo { - domid_t domain; /* the domain number */ - uint32_t flags; /* flags, see before */ - uint64_t tot_pages ALIGN_64; /* total number of pages used */ - uint64_t max_pages ALIGN_64; /* maximum number of pages allowed */ + domid_t domain; /* the domain number */ + uint32_t flags; /* flags, see before */ + uint64_t tot_pages ALIGN_64; /* total number of pages used */ + uint64_t max_pages ALIGN_64; /* maximum number of pages allowed= */ uint64_t shr_pages ALIGN_64; /* number of shared pages */ uint64_t shared_info_frame ALIGN_64; /* MFN of shared_info struct */ uint64_t cpu_time ALIGN_64; /* CPU time used */ @@ -253,10 +253,10 @@ struct xen_v2d7_getdomaininfo { typedef struct xen_v2d7_getdomaininfo xen_v2d7_getdomaininfo; =20 struct xen_v2d8_getdomaininfo { - domid_t domain; /* the domain number */ - uint32_t flags; /* flags, see before */ - uint64_t tot_pages ALIGN_64; /* total number of pages used */ - uint64_t max_pages ALIGN_64; /* maximum number of pages allowed */ + domid_t domain; /* the domain number */ + uint32_t flags; /* flags, see before */ + uint64_t tot_pages ALIGN_64; /* total number of pages used */ + uint64_t max_pages ALIGN_64; /* maximum number of pages allowed= */ uint64_t shr_pages ALIGN_64; /* number of shared pages */ uint64_t paged_pages ALIGN_64; /* number of paged pages */ uint64_t shared_info_frame ALIGN_64; /* MFN of shared_info struct */ @@ -270,10 +270,10 @@ struct xen_v2d8_getdomaininfo { typedef struct xen_v2d8_getdomaininfo xen_v2d8_getdomaininfo; =20 struct xen_v2d9_getdomaininfo { - domid_t domain; /* the domain number */ - uint32_t flags; /* flags, see before */ - uint64_t tot_pages ALIGN_64; /* total number of pages used */ - uint64_t max_pages ALIGN_64; /* maximum number of pages allowed */ + domid_t domain; /* the domain number */ + uint32_t flags; /* flags, see before */ + uint64_t tot_pages ALIGN_64; /* total number of pages used */ + uint64_t max_pages ALIGN_64; /* maximum number of pages allowed= */ uint64_t outstanding_pages ALIGN_64; uint64_t shr_pages ALIGN_64; /* number of shared pages */ uint64_t paged_pages ALIGN_64; /* number of paged pages */ @@ -661,38 +661,38 @@ typedef struct xen_v0_domainop xen_v0_domainop; /* * The information for a pausedomain system hypercall */ -#define XEN_V0_OP_PAUSEDOMAIN 10 -#define XEN_V1_OP_PAUSEDOMAIN 10 -#define XEN_V2_OP_PAUSEDOMAIN 3 +#define XEN_V0_OP_PAUSEDOMAIN 10 +#define XEN_V1_OP_PAUSEDOMAIN 10 +#define XEN_V2_OP_PAUSEDOMAIN 3 =20 /* * The information for an unpausedomain system hypercall */ -#define XEN_V0_OP_UNPAUSEDOMAIN 11 -#define XEN_V1_OP_UNPAUSEDOMAIN 11 -#define XEN_V2_OP_UNPAUSEDOMAIN 4 +#define XEN_V0_OP_UNPAUSEDOMAIN 11 +#define XEN_V1_OP_UNPAUSEDOMAIN 11 +#define XEN_V2_OP_UNPAUSEDOMAIN 4 =20 /* * The information for a setmaxmem system hypercall */ -#define XEN_V0_OP_SETMAXMEM 28 -#define XEN_V1_OP_SETMAXMEM 28 -#define XEN_V2_OP_SETMAXMEM 11 +#define XEN_V0_OP_SETMAXMEM 28 +#define XEN_V1_OP_SETMAXMEM 28 +#define XEN_V2_OP_SETMAXMEM 11 =20 struct xen_v0_setmaxmem { - domid_t domain; - uint64_t maxmem; + domid_t domain; + uint64_t maxmem; }; typedef struct xen_v0_setmaxmem xen_v0_setmaxmem; typedef struct xen_v0_setmaxmem xen_v1_setmaxmem; =20 struct xen_v2_setmaxmem { - uint64_t maxmem; + uint64_t maxmem; }; typedef struct xen_v2_setmaxmem xen_v2_setmaxmem; =20 struct xen_v2d5_setmaxmem { - uint64_t maxmem ALIGN_64; + uint64_t maxmem ALIGN_64; }; typedef struct xen_v2d5_setmaxmem xen_v2d5_setmaxmem; =20 @@ -701,13 +701,13 @@ typedef struct xen_v2d5_setmaxmem xen_v2d5_setmaxmem; * Note that between 1 and 2 the limitation to 64 physical CPU was lifted * hence the difference in structures */ -#define XEN_V0_OP_SETVCPUMAP 20 -#define XEN_V1_OP_SETVCPUMAP 20 -#define XEN_V2_OP_SETVCPUMAP 9 +#define XEN_V0_OP_SETVCPUMAP 20 +#define XEN_V1_OP_SETVCPUMAP 20 +#define XEN_V2_OP_SETVCPUMAP 9 =20 struct xen_v0_setvcpumap { - domid_t domain; - uint32_t vcpu; + domid_t domain; + uint32_t vcpu; cpumap_t cpumap; }; typedef struct xen_v0_setvcpumap xen_v0_setvcpumap; @@ -718,7 +718,7 @@ struct xen_v2_cpumap { uint32_t nr_cpus; }; struct xen_v2_setvcpumap { - uint32_t vcpu; + uint32_t vcpu; struct xen_v2_cpumap cpumap; }; typedef struct xen_v2_setvcpumap xen_v2_setvcpumap; @@ -739,7 +739,7 @@ struct xen_v2d5_cpumap { uint32_t nr_cpus; }; struct xen_v2d5_setvcpumap { - uint32_t vcpu; + uint32_t vcpu; struct xen_v2d5_cpumap cpumap; }; typedef struct xen_v2d5_setvcpumap xen_v2d5_setvcpumap; @@ -748,63 +748,63 @@ typedef struct xen_v2d5_setvcpumap xen_v2d5_setvcpuma= p; * The information for a vcpuinfo system hypercall */ #define XEN_V0_OP_GETVCPUINFO 43 -#define XEN_V1_OP_GETVCPUINFO 43 +#define XEN_V1_OP_GETVCPUINFO 43 #define XEN_V2_OP_GETVCPUINFO 14 =20 struct xen_v0_vcpuinfo { - domid_t domain; /* owner's domain */ - uint32_t vcpu; /* the vcpu number */ - uint8_t online; /* seen as on line */ - uint8_t blocked; /* blocked on event */ - uint8_t running; /* scheduled on CPU */ - uint64_t cpu_time; /* nanosecond of CPU used */ - uint32_t cpu; /* current mapping */ - cpumap_t cpumap; /* deprecated in V2 */ + domid_t domain; /* owner's domain */ + uint32_t vcpu; /* the vcpu number */ + uint8_t online; /* seen as on line */ + uint8_t blocked; /* blocked on event */ + uint8_t running; /* scheduled on CPU */ + uint64_t cpu_time; /* nanosecond of CPU used */ + uint32_t cpu; /* current mapping */ + cpumap_t cpumap; /* deprecated in V2 */ }; typedef struct xen_v0_vcpuinfo xen_v0_vcpuinfo; typedef struct xen_v0_vcpuinfo xen_v1_vcpuinfo; =20 struct xen_v2_vcpuinfo { - uint32_t vcpu; /* the vcpu number */ - uint8_t online; /* seen as on line */ - uint8_t blocked; /* blocked on event */ - uint8_t running; /* scheduled on CPU */ - uint64_t cpu_time; /* nanosecond of CPU used */ - uint32_t cpu; /* current mapping */ + uint32_t vcpu; /* the vcpu number */ + uint8_t online; /* seen as on line */ + uint8_t blocked; /* blocked on event */ + uint8_t running; /* scheduled on CPU */ + uint64_t cpu_time; /* nanosecond of CPU used */ + uint32_t cpu; /* current mapping */ }; typedef struct xen_v2_vcpuinfo xen_v2_vcpuinfo; =20 struct xen_v2d5_vcpuinfo { - uint32_t vcpu; /* the vcpu number */ - uint8_t online; /* seen as on line */ - uint8_t blocked; /* blocked on event */ - uint8_t running; /* scheduled on CPU */ + uint32_t vcpu; /* the vcpu number */ + uint8_t online; /* seen as on line */ + uint8_t blocked; /* blocked on event */ + uint8_t running; /* scheduled on CPU */ uint64_t cpu_time ALIGN_64; /* nanosecond of CPU used */ - uint32_t cpu; /* current mapping */ + uint32_t cpu; /* current mapping */ }; typedef struct xen_v2d5_vcpuinfo xen_v2d5_vcpuinfo; =20 /* * from V2 the pinning of a vcpu is read with a separate call */ -#define XEN_V2_OP_GETVCPUMAP 25 +#define XEN_V2_OP_GETVCPUMAP 25 typedef struct xen_v2_setvcpumap xen_v2_getvcpumap; typedef struct xen_v2d5_setvcpumap xen_v2d5_getvcpumap; =20 /* * from V2 we get the scheduler information */ -#define XEN_V2_OP_GETSCHEDULERID 4 +#define XEN_V2_OP_GETSCHEDULERID 4 =20 /* * from V2 we get the available heap information */ -#define XEN_V2_OP_GETAVAILHEAP 9 +#define XEN_V2_OP_GETAVAILHEAP 9 =20 /* * from V2 we get the scheduler parameter */ -#define XEN_V2_OP_SCHEDULER 16 +#define XEN_V2_OP_SCHEDULER 16 /* Scheduler types. */ #define XEN_SCHEDULER_SEDF 4 #define XEN_SCHEDULER_CREDIT 5 @@ -891,10 +891,10 @@ typedef struct xen_op_v2_dom xen_op_v2_dom; =20 =20 #ifdef __linux__ -# define XEN_HYPERVISOR_SOCKET "/proc/xen/privcmd" -# define HYPERVISOR_CAPABILITIES "/sys/hypervisor/properties/capabilities" +# define XEN_HYPERVISOR_SOCKET "/proc/xen/privcmd" +# define HYPERVISOR_CAPABILITIES "/sys/hypervisor/properties/capabi= lities" #elif defined(__sun) -# define XEN_HYPERVISOR_SOCKET "/dev/xen/privcmd" +# define XEN_HYPERVISOR_SOCKET "/dev/xen/privcmd" #else # error "unsupported platform" #endif @@ -3002,13 +3002,13 @@ xenHypervisorPinVcpu(virConnectPtr conn, * @info: pointer to an array of virVcpuInfo structures (OUT) * @maxinfo: number of structures in info array * @cpumaps: pointer to a bit map of real CPUs for all vcpus of this domai= n (in 8-bit bytes) (OUT) - * If cpumaps is NULL, then no cpumap information is returned by the API. - * It's assumed there is cpumap in cpumaps array. - * The memory allocated to cpumaps must be (maxinfo * maplen) bytes - * (ie: calloc(maxinfo, maplen)). - * One cpumap inside cpumaps has the format described in virDomainPinVcpu(= ) API. + * If cpumaps is NULL, then no cpumap information is returned by the = API. + * It's assumed there is cpumap in cpumaps array. + * The memory allocated to cpumaps must be (maxinfo * maplen) bytes + * (ie: calloc(maxinfo, maplen)). + * One cpumap inside cpumaps has the format described in virDomainPin= Vcpu() API. * @maplen: number of bytes in one cpumap, from 1 up to size of CPU map in - * underlying virtualization system (Xen...). + * underlying virtualization system (Xen...). * * Extract information about virtual CPUs of domain, store it in info array * and also in cpumaps if this pointer isn't NULL. diff --git a/src/xen/xen_hypervisor.h b/src/xen/xen_hypervisor.h index f59847ff1..5a964690f 100644 --- a/src/xen/xen_hypervisor.h +++ b/src/xen/xen_hypervisor.h @@ -137,6 +137,6 @@ int xenHypervisorNodeGetCellsFreeMemory(virConnectP= tr conn, int startCell, int maxCells); =20 -int xenHavePrivilege(void); +int xenHavePrivilege(void); =20 #endif /* __VIR_XEN_INTERNAL_H__ */ diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 6da295090..ccb1478b3 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -1888,13 +1888,13 @@ xenDaemonDomainGetVcpusFlags(virConnectPtr conn, * @info: pointer to an array of virVcpuInfo structures (OUT) * @maxinfo: number of structures in info array * @cpumaps: pointer to a bit map of real CPUs for all vcpus of this domai= n (in 8-bit bytes) (OUT) - * If cpumaps is NULL, then no cpumap information is returned by the API. - * It's assumed there is cpumap in cpumaps array. - * The memory allocated to cpumaps must be (maxinfo * maplen) bytes - * (ie: calloc(maxinfo, maplen)). - * One cpumap inside cpumaps has the format described in virDomainPinVcpu(= ) API. + * If cpumaps is NULL, then no cpumap information is returned by the = API. + * It's assumed there is cpumap in cpumaps array. + * The memory allocated to cpumaps must be (maxinfo * maplen) bytes + * (ie: calloc(maxinfo, maplen)). + * One cpumap inside cpumaps has the format described in virDomainPin= Vcpu() API. * @maplen: number of bytes in one cpumap, from 1 up to size of CPU map in - * underlying virtualization system (Xen...). + * underlying virtualization system (Xen...). * * Extract information about virtual CPUs of domain, store it in info array * and also in cpumaps if this pointer isn't NULL. diff --git a/src/xen/xend_internal.h b/src/xen/xend_internal.h index 9064b4728..7e947ff6e 100644 --- a/src/xen/xend_internal.h +++ b/src/xen/xend_internal.h @@ -147,14 +147,14 @@ int xenDaemonDomainCreate(virConnectPtr conn, int xenDaemonDomainUndefine(virConnectPtr conn, virDomainDefPtr def); =20 -int xenDaemonDomainSetVcpus (virConnectPtr conn, +int xenDaemonDomainSetVcpus (virConnectPtr conn, virDomainDefPtr def, unsigned int vcpus); -int xenDaemonDomainSetVcpusFlags (virConnectPtr conn, +int xenDaemonDomainSetVcpusFlags (virConnectPtr conn, virDomainDefPtr def, unsigned int vcpus, unsigned int flags); -int xenDaemonDomainPinVcpu (virConnectPtr conn, +int xenDaemonDomainPinVcpu (virConnectPtr conn, virDomainDefPtr def, unsigned int vcpu, unsigned char *cpumap, @@ -162,7 +162,7 @@ int xenDaemonDomainPinVcpu (virConnectPtr conn, int xenDaemonDomainGetVcpusFlags (virConnectPtr conn, virDomainDefPtr def, unsigned int flags); -int xenDaemonDomainGetVcpus (virConnectPtr conn, +int xenDaemonDomainGetVcpus (virConnectPtr conn, virDomainDefPtr def, virVcpuInfoPtr info, int maxinfo, diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c index 7c82a3444..60d35ebcd 100644 --- a/src/xen/xs_internal.c +++ b/src/xen/xs_internal.c @@ -60,9 +60,9 @@ static void xenStoreWatchEvent(int watch, int fd, int eve= nts, void *data); static void xenStoreWatchListFree(xenStoreWatchListPtr list); =20 /************************************************************************ - * * - * Helper internal APIs * - * * + * * + * Helper internal APIs * + * * ************************************************************************/ =20 /** @@ -92,9 +92,9 @@ virDomainDoStoreQuery(virConnectPtr conn, int domid, cons= t char *path) } =20 /************************************************************************ - * * - * Canonical internal APIs * - * * + * * + * Canonical internal APIs * + * * ************************************************************************/ /** * xenStoreOpen: @@ -737,10 +737,10 @@ xenStoreWatchEvent(int watch ATTRIBUTE_UNUSED, int fd ATTRIBUTE_UNUSED, int events, void *data) { - char **event; - char *path; - char *token; - unsigned int stringCount; + char **event; + char *path; + char *token; + unsigned int stringCount; xenStoreWatchPtr sw; =20 virConnectPtr conn =3D data; diff --git a/src/xen/xs_internal.h b/src/xen/xs_internal.h index 24e2627b5..69cca585c 100644 --- a/src/xen/xs_internal.h +++ b/src/xen/xs_internal.h @@ -26,12 +26,12 @@ # include "internal.h" # include "driver.h" =20 -int xenStoreOpen (virConnectPtr conn, +int xenStoreOpen (virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags); -int xenStoreClose (virConnectPtr conn); -int xenStoreNumOfDomains (virConnectPtr conn); -int xenStoreListDomains (virConnectPtr conn, +int xenStoreClose (virConnectPtr conn); +int xenStoreNumOfDomains (virConnectPtr conn); +int xenStoreListDomains (virConnectPtr conn, int *ids, int maxids); =20 @@ -41,13 +41,13 @@ char * xenStoreDomainGetConsolePath(virConnect= Ptr conn, int domid); char * xenStoreDomainGetSerialConsolePath(virConnectPtr conn, int domid); -char * xenStoreDomainGetNetworkID(virConnectPtr conn, +char * xenStoreDomainGetNetworkID(virConnectPtr conn, int id, const char *mac); -char * xenStoreDomainGetDiskID(virConnectPtr conn, +char * xenStoreDomainGetDiskID(virConnectPtr conn, int id, const char *dev); -char * xenStoreDomainGetPCIID(virConnectPtr conn, +char * xenStoreDomainGetPCIID(virConnectPtr conn, int domid, const char *bdf); char * xenStoreDomainGetName(virConnectPtr conn, --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 19:39:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1508253896363643.0978192326462; Tue, 17 Oct 2017 08:24:56 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B882820FC; Tue, 17 Oct 2017 15:24: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 CBA8164452; Tue, 17 Oct 2017 15:24: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 7F8C4180596F; Tue, 17 Oct 2017 15:24:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9HFOgdY007107 for ; Tue, 17 Oct 2017 11:24:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id B868B78002; Tue, 17 Oct 2017 15:24:42 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 18FB078004; Tue, 17 Oct 2017 15:24:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0B882820FC Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Erik Skultety To: libvir-list@redhat.com Date: Tue, 17 Oct 2017 17:24:31 +0200 Message-Id: <62fea6f4a07eb780a02b2ff06bc45c278f859114.1508253701.git.eskultet@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 2/2] maint: Remove not-so-much informative block commentaries 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 17 Oct 2017 15:24:55 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" There were a bunch of commentary blocks that were literally useless in terms of describing what the code following them does, since most of them were documenting "the obvious" or it just wouldn't help at all. Signed-off-by: Erik Skultety --- daemon/remote.c | 7 ------- src/network/bridge_driver.c | 2 -- src/util/virconf.c | 33 --------------------------------- src/util/virerror.h | 5 ----- src/util/virxml.c | 6 ------ src/vbox/vbox_XPCOMCGlue.c | 9 --------- src/xen/xend_internal.c | 11 ----------- src/xen/xs_internal.c | 10 ---------- src/xenconfig/xen_sxpr.c | 5 ----- 9 files changed, 88 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index fd8542120..3f7d2d344 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -3750,10 +3750,6 @@ remoteDispatchAuthPolkit(virNetServerPtr server, } =20 =20 -/*************************************************************** - * NODE INFO APIS - **************************************************************/ - static int remoteDispatchNodeDeviceGetParent(virNetServerPtr server ATTRIBUTE_UNUSED, virNetServerClientPtr client ATTRIBUTE_U= NUSED, @@ -3864,9 +3860,6 @@ remoteDispatchConnectUnregisterCloseCallback(virNetSe= rverPtr server ATTRIBUTE_UN return rv; } =20 -/*************************** - * Register / deregister events - ***************************/ static int remoteDispatchConnectDomainEventRegister(virNetServerPtr server ATTRIBUTE_= UNUSED, virNetServerClientPtr client, diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 530d00ff3..fcaa66df9 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -4286,8 +4286,6 @@ networkRegister(void) } =20 =20 -/********************************************************/ - /* A unified function to log network connections and disconnections */ =20 static void diff --git a/src/util/virconf.c b/src/util/virconf.c index a88cc9901..5822ee45e 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -44,12 +44,6 @@ =20 VIR_LOG_INIT("util.conf"); =20 -/************************************************************************ - * * - * Structures and macros used by the mini parser * - * * - ************************************************************************/ - typedef struct _virConfParserCtxt virConfParserCtxt; typedef virConfParserCtxt *virConfParserCtxtPtr; =20 @@ -75,12 +69,6 @@ struct _virConfParserCtxt { do { while ((ctxt->cur < ctxt->end) && (c_isblank(CUR))) \ ctxt->cur++; } while (0) =20 -/************************************************************************ - * * - * Structures used by configuration data * - * * - ************************************************************************/ - VIR_ENUM_IMPL(virConf, VIR_CONF_LAST, "*unexpected*", "long", @@ -133,12 +121,6 @@ virConfErrorHelper(const char *file, const char *func,= size_t line, } =20 =20 -/************************************************************************ - * * - * Structures allocations and deallocations * - * * - ************************************************************************/ - /** * virConfFreeList: * @list: the list to free @@ -260,11 +242,6 @@ virConfAddEntry(virConfPtr conf, char *name, virConfVa= luePtr value, char *comm) return ret; } =20 -/************************************************************************ - * * - * Serialization * - * * - ************************************************************************/ =20 /** * virConfSaveValue: @@ -353,11 +330,6 @@ virConfSaveEntry(virBufferPtr buf, virConfEntryPtr cur) return 0; } =20 -/************************************************************************ - * * - * The parser core * - * * - ************************************************************************/ =20 /** * virConfParseLong: @@ -754,11 +726,6 @@ virConfParse(const char *filename, const char *content= , int len, return NULL; } =20 -/************************************************************************ - * * - * The module entry points * - * * - ************************************************************************/ =20 /* 10 MB limit on config file size as a sanity check */ #define MAX_CONFIG_FILE_SIZE (1024*1024*10) diff --git a/src/util/virerror.h b/src/util/virerror.h index 054f50fd7..3201d5cec 100644 --- a/src/util/virerror.h +++ b/src/util/virerror.h @@ -27,11 +27,6 @@ extern virErrorFunc virErrorHandler; extern void *virUserData; =20 -/************************************************************************ - * * - * API for error handling * - * * - ************************************************************************/ int virErrorInitialize(void); void virRaiseErrorFull(const char *filename, const char *funcname, diff --git a/src/util/virxml.c b/src/util/virxml.c index a7c28b1e3..1ff1e3653 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -50,12 +50,6 @@ struct virParserData { }; =20 =20 -/************************************************************************ - * * - * Wrappers around libxml2 XPath specific functions * - * * - ************************************************************************/ - /** * virXPathString: * @xpath: the XPath string to evaluate diff --git a/src/vbox/vbox_XPCOMCGlue.c b/src/vbox/vbox_XPCOMCGlue.c index ff03279ed..cae6d0c62 100644 --- a/src/vbox/vbox_XPCOMCGlue.c +++ b/src/vbox/vbox_XPCOMCGlue.c @@ -26,9 +26,6 @@ * additional information or have any questions. */ =20 -/*************************************************************************= ****** -* Header Files = * -**************************************************************************= *****/ =20 #include =20 @@ -48,9 +45,6 @@ =20 VIR_LOG_INIT("vbox.vbox_XPCOMCGlue"); =20 -/*************************************************************************= ****** -* Defined Constants And Macros = * -**************************************************************************= *****/ #if defined(__linux__) || defined(__linux_gnu__) || defined(__sun__) || \ defined(__FreeBSD__) || defined(__OpenBSD__) || \ defined(__FreeBSD_kernel__) @@ -64,9 +58,6 @@ VIR_LOG_INIT("vbox.vbox_XPCOMCGlue"); #endif =20 =20 -/*************************************************************************= ****** -* Global Variables = * -**************************************************************************= *****/ /** The dlopen handle for VBoxXPCOMC. */ static void *hVBoxXPCOMC; /** Pointer to the VBoxXPCOMC function table. */ diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index ccb1478b3..e4edfd6f8 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -1122,17 +1122,6 @@ sexpr_to_domain(virConnectPtr conn ATTRIBUTE_UNUSED,= const struct sexpr *root) } =20 =20 -/***************************************************************** - ****** - ****** - ****** - ****** - Refactored - ****** - ****** - ****** - ****** - *****************************************************************/ /** * xenDaemonOpen: * @conn: an existing virtual connection block diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c index 60d35ebcd..353169da0 100644 --- a/src/xen/xs_internal.c +++ b/src/xen/xs_internal.c @@ -59,11 +59,6 @@ VIR_LOG_INIT("xen.xs_internal"); static void xenStoreWatchEvent(int watch, int fd, int events, void *data); static void xenStoreWatchListFree(xenStoreWatchListPtr list); =20 -/************************************************************************ - * * - * Helper internal APIs * - * * - ************************************************************************/ =20 /** * virDomainDoStoreQuery: @@ -91,11 +86,6 @@ virDomainDoStoreQuery(virConnectPtr conn, int domid, con= st char *path) return xs_read(priv->xshandle, 0, &s[0], &len); } =20 -/************************************************************************ - * * - * Canonical internal APIs * - * * - ************************************************************************/ /** * xenStoreOpen: * @conn: pointer to the connection block diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c index fefa61ac2..358d0cbef 100644 --- a/src/xenconfig/xen_sxpr.c +++ b/src/xenconfig/xen_sxpr.c @@ -70,11 +70,6 @@ int xenGetDomIdFromSxpr(const struct sexpr *root, int *i= d) return 0; } =20 -/***************************************************************** - ****** - ****** Parsing of S-Expression into virDomainDef objects - ****** - *****************************************************************/ =20 /** * xenParseSxprOS: --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list