[libvirt] devel guide bug on listing domains

On IRC, it was pointed out that: http://libvirt.org/guide/html-single/#Application_Development_Guide-Guest_Do... it was pointed out that example 4.5 (section 4.2 Listing domains) incorrectly uses virConnectListDomains instead of the intended virConnectListDefinedDomains. I'm not sure where the source to this document is kept, or I would have pushed the obvious patch. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On Wed, Nov 24, 2010 at 09:17:44AM -0700, Eric Blake wrote:
On IRC, it was pointed out that:
http://libvirt.org/guide/html-single/#Application_Development_Guide-Guest_Do...
it was pointed out that example 4.5 (section 4.2 Listing domains) incorrectly uses virConnectListDomains instead of the intended virConnectListDefinedDomains. I'm not sure where the source to this document is kept, or I would have pushed the obvious patch.
It is in GIT of course :-) http://libvirt.org/git/?p=libvirt-appdev-guide.git;a=summary Daniel

* en_US/Guest_Domains.xml (numDomains): Fix example typo. ---
I'm not sure where the source to this document is kept, or I would have pushed the obvious patch. It is in GIT of course :-)
I figured as much, just didn't know the repository name. Now I do, so now I'm pushing this :) en-US/Guest_Domains.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/en-US/Guest_Domains.xml b/en-US/Guest_Domains.xml index fe73abe..b7b7d7a 100644 --- a/en-US/Guest_Domains.xml +++ b/en-US/Guest_Domains.xml @@ -190,7 +190,7 @@ char **inactiveDomains; numDomains = virConnectNumOfDefinedDomains(conn); inactiveDomains = malloc(sizeof(char *) * numDomains); -numDomains = virConnectListDomains(conn, inactiveDomains, numDomains); +numDomains = virConnectListDefinedDomains(conn, inactiveDomains, numDomains); printf("Inactive domain names:\n"); for (i = 0 ; i < numDomains ; i++) { -- 1.7.3.2
participants (2)
-
Daniel P. Berrange
-
Eric Blake