libvirt/docs
Eric Blake ceefdec93c docs: publish correct enum values
We publish libvirt-api.xml for others to use, and in fact, the
libvirt-python bindings use it to generate python constants that
correspond to our enum values.  However, we had an off-by-one bug
that any enum that relied on C's rules for implicit initialization
of the first enum member to 0 got listed in the xml as having a
value of 1 (and all later members of the enum were equally
botched).

The fix is simple - since we add one to the previous value when
encountering an enum without an initializer, the previous value
must start at -1 so that the first enum member is assigned 0.

The python generator code has had the off-by-one ever since DV
first wrote it years ago, but most of our public enums were immune
because they had an explicit = 0 initializer.  The only affected
enums are:
- virDomainEventGraphicsAddressType (such as
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4), since commit 987e31e
(libvirt v0.8.0)
- virDomainCoreDumpFormat (such as VIR_DOMAIN_CORE_DUMP_FORMAT_RAW),
since commit 9fbaff0 (libvirt v1.2.3)
- virIPAddrType (such as VIR_IP_ADDR_TYPE_IPV4), since commit
03e0e79 (not yet released)

Thanks to Nehal J Wani for reporting the problem on IRC, and
for helping me zero in on the culprit function.

* docs/apibuild.py (CParser.parseEnumBlock): Fix implicit enum
values.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 9b291bbe20)

Conflicts:
	docs/apibuild.py - context with 2a40951
2014-06-26 17:08:15 -06:00
..
api_extension xen_xs: name xendConfigVersion magic numbers 2012-02-01 16:28:17 -07:00
devhelp maint: consolidate several .gitignore files 2012-02-03 15:27:16 -07:00
html maint: consolidate several .gitignore files 2012-02-03 15:27:16 -07:00
internals docs: fix usage of 'onto' 2013-04-19 14:31:16 -06:00
schemas LXC: Fix handling of RAM filesystem size units 2013-10-15 13:26:55 +02:00
32favicon.png
404.html.in docs: fix 404 page when fetched from different location 2012-08-10 10:54:23 +02:00
api_extension.html.in docs/virsh: various minor fixes 2012-08-10 10:58:54 +02:00
api.html.in api: Add text and references for daemon 2013-03-04 17:36:03 -05:00
apibuild.py docs: publish correct enum values 2014-06-26 17:08:15 -06:00
apps.html.in Various typos and misspellings 2012-10-12 00:03:43 +02:00
archdomain.html.in Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
architecture.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
architecture.gif
architecture.html.in docs: added a table of contents to the first 11 docs files 2010-10-27 15:01:45 +11:00
archnetwork.html.in docs: correct invalid xml 2011-04-01 16:03:11 -06:00
archnode.html.in Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
archstorage.html.in Cleanup whitespace in docs 2009-11-06 16:05:18 +01:00
auth.html.in docs: fix typo when using Kerberos principals 2013-04-09 16:46:04 -06:00
bindings.html.in docs: Add information about libvirt-php new location 2011-02-09 12:29:29 -07:00
bugs.html.in Fix some typos in messages, docs and comments. 2012-08-22 15:34:07 -06:00
cgroups.html.in Add docs about cgroups layout and usage 2013-07-11 10:37:09 -06:00
compiling.html.in build: honor autogen.sh --no-git 2013-07-29 15:58:59 -06:00
contact.html.in docs: added libvirt-announce to contact page 2011-01-05 18:07:30 +11:00
csharp.html.in docs: updated c# bindings with arnauds latest changes 2010-11-30 02:22:38 +11:00
deployment.html.in docs: added a table of contents to the first 11 docs files 2010-10-27 15:01:45 +11:00
devguide.html.in docs: added a table of contents to the first 11 docs files 2010-10-27 15:01:45 +11:00
docs.html.in Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
downloads.html.in docs: added compiling page and significantly expanded windows page 2010-12-21 20:55:10 +11:00
drivers.html.in Add references for phyp and parallels 2013-03-04 17:36:03 -05:00
drvesx.html.in esx: Update version checks for vSphere 5.1 2012-10-24 19:50:28 +02:00
drvhyperv.html.in hyperv: Add basic documentation 2011-08-26 17:52:55 +02:00
drvlxc.html.in virterror.c: Fix several spelling mistakes 2012-02-03 11:32:51 -07:00
drvopenvz.html.in docs: fix path to openvz network configuration file 2012-04-16 17:02:08 +02:00
drvparallels.html.in parallels: add domain configuration example 2012-08-15 16:39:40 +08:00
drvphyp.html.in docs: Drop useless </p> in drvphyp.html.in 2012-10-09 15:20:32 +02:00
drvqemu.html.in Fix some typos in messages, docs and comments. 2012-08-22 15:34:07 -06:00
drvremote.html.in Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
drvtest.html.in Fix some typos in messages, docs and comments. 2012-08-22 15:34:07 -06:00
drvuml.html.in website: Point main page links to libvirt driver pages 2011-07-15 13:19:41 -06:00
drvvbox.html.in vbox: Support shared folders 2011-10-29 19:50:48 +02:00
drvvmware.html.in website: Point main page links to libvirt driver pages 2011-07-15 13:19:41 -06:00
drvxen.html.in Convert libxl driver to Xen 4.2 2012-12-06 16:15:54 -07:00
errors.html.in Fix a number of small typos 2009-09-22 12:55:39 +02:00
et.png * docs/Makefile.am docs/et.png docs/libvirt.css docs/page.xsl 2008-04-28 08:29:35 +00:00
firewall.html.in docs: aesthetical cleanups 2013-01-30 09:37:03 +01:00
footer_corner.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
footer_pattern.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
format.html.in Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
formatcaps.html.in Remove powerMgmt_valid field from capabilities struct 2011-11-30 10:12:30 +00:00
formatdomain.html.in Fix minor typos in messages and docs 2014-02-18 17:37:25 +00:00
formatnetwork.html.in conf: formatter/parser/RNG/docs for hostdev <driver name='kvm|vfio'/> 2013-04-25 21:23:38 -04:00
formatnode.html.in nodedev: Dump max vports and vports in use for HBA's XML 2013-03-25 20:46:05 +08:00
formatnwfilter.html.in Fix some typos in messages, docs and comments. 2012-08-22 15:34:07 -06:00
formatsecret.html.in secret: add iscsi to possible usage types 2013-03-22 12:10:23 +08:00
formatsnapshot.html.in docs: Fix closing tag in snapshot documentation 2013-05-01 20:03:12 +02:00
formatstorage.html.in storage: Make the adapter name be consistent with node device driver 2013-04-08 18:41:06 +08:00
formatstorageencryption.html.in docs: correct invalid xml 2011-04-01 16:03:11 -06:00
generic.css docs: Add some style and color to the HTML documentation 2013-01-18 15:36:38 +01:00
goals.html.in Update on the goal page 2011-03-28 10:40:24 +08:00
hacking1.xsl Generate HACKING from docs/hacking.html.in 2010-11-12 19:47:20 +01:00
hacking2.xsl docs: point out git send-email location, be more stern about make check 2012-09-08 23:20:29 -04:00
hacking.html.in Fix minor typos in messages and docs 2014-02-18 17:37:25 +00:00
hooks.html.in hook: log the exit status of the hook not 256 2013-03-01 20:28:00 +01:00
hvsupport.pl Dedicated name for sub-driver open/close methods 2013-04-24 10:59:54 +01:00
index.html.in Add references for phyp and parallels 2013-03-04 17:36:03 -05:00
index.py Remove more trailing semicolons in Python files 2013-02-07 19:52:44 +01:00
internals.html.in internals: Update to include RPC and Lock links and add new data 2013-03-04 17:36:03 -05:00
intro.html.in * docs/*: start cleanup/revamp of architecture docs 2009-04-02 12:01:11 +00:00
java.html.in doc: Add Maven repository to Java bindings documentation 2012-10-04 09:17:45 -06:00
library.xen remove all trailing blank lines 2009-07-16 15:06:42 +02:00
libvirt-daemon-arch.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-daemon-arch.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-driver-arch.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-driver-arch.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-header-bg.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
libvirt-header-logo.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
libvirt-net-logical.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-net-logical.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-net-physical.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-net-physical.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-object-model.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-object-model.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-virConnect-example.fig internals: Update to include RPC and Lock links and add new data 2013-03-04 17:36:03 -05:00
libvirt-virConnect-example.png internals: Update to include RPC and Lock links and add new data 2013-03-04 17:36:03 -05:00
libvirt.css docs: use div, not table, for notices on opaque types 2013-02-01 08:47:38 +01:00
libvirtLogo404.png Add a custom 404 error page for the website 2012-06-18 20:10:29 +01:00
libvirtLogo.png
locking.html.in sanlock: Introduce 'user' and 'group' conf variables 2012-10-30 10:12:10 +01:00
logging.html.in docs: Enhance documentation of log_filters 2012-08-17 21:26:53 +02:00
madeWith.png
main.css Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
Makefile.am test: Return Libvirt logo as domain screenshot 2013-04-02 14:38:56 +02:00
migration-managed-direct.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-managed-direct.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-managed-p2p.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-managed-p2p.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-native.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-native.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-tunnel.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-tunnel.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-unmanaged-direct.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-unmanaged-direct.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration.html.in Fix minor typos in messages and docs 2014-02-18 17:37:25 +00:00
newapi.xsl docs: use div, not table, for notices on opaque types 2013-02-01 08:47:38 +01:00
news.html.in Fix minor typos in messages and docs 2014-02-18 17:37:25 +00:00
news.xsl Convert NEWS to UTF-8 2009-07-29 09:04:21 +01:00
node.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
node.gif
page.xsl docs: page.xsl: fix FAQ link in subdirectories 2012-09-11 17:36:03 +02:00
pending.html.in docs/virsh: various minor fixes 2012-08-10 10:58:54 +02:00
php.html.in docs: Add information about libvirt-php new location 2011-02-09 12:29:29 -07:00
python.html.in docs: fix typo in python bindings 2012-02-09 14:28:40 -07:00
relatedlinks.html.in doc: include article about libvirt+audit in relatedlinks.html 2012-09-20 15:47:21 -06:00
remote.html.in Various typos and misspellings 2012-10-12 00:03:43 +02:00
search.php.code.in docs: autogenerate search.php 2012-08-10 10:58:38 +02:00
search.php.in docs: autogenerate search.php 2012-08-10 10:58:38 +02:00
site.xsl docs: fix 404 page when fetched from different location 2012-08-10 10:54:23 +02:00
sitemap.html.in Add docs about cgroups layout and usage 2013-07-11 10:37:09 -06:00
storage.html.in doc: storage: Fix grammar 2013-03-20 21:47:49 +08:00
structures.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
subsite.xsl virCommand: docs for usage of new command APIs 2010-12-02 16:00:47 -07:00
testapi.html.in Add documentation about test suites 2011-05-11 19:18:38 +08:00
testsuites.html.in docs: avoid double 'the' 2011-05-11 08:18:04 -06:00
testtck.html.in Add documentation about test suites 2011-05-11 19:18:38 +08:00
todo.cfg-example Add automatic generation of a todo item page 2010-10-12 11:26:52 +01:00
todo.pl Remove tabs from all perl files & enforce this 2012-07-30 13:09:57 +01:00
uri.html.in docs: Fix location of libvirt.conf and auth.conf 2012-12-14 13:35:03 +01:00
virshcmdref.html.in docs: updated memtune info again in virsh command reference 2011-01-11 07:33:15 +11:00
windows.html.in docs: correct invalid xml 2011-04-01 16:03:11 -06:00
wrapstring.xsl Generate HACKING from docs/hacking.html.in 2010-11-12 19:47:20 +01:00