Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 297859 Details for
Bug 437216
virConnectListDefinedDomains isn't returning the names of active domains
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
little reproducer program
rhbz437216a1.c (text/x-csrc), 910 bytes, created by
Ryan McCabe
on 2008-03-12 22:33:34 UTC
(
hide
)
Description:
little reproducer program
Filename:
MIME Type:
Creator:
Ryan McCabe
Created:
2008-03-12 22:33:34 UTC
Size:
910 bytes
patch
obsolete
>#include <unistd.h> >#include <stdlib.h> >#include <stdio.h> >#include <libvirt/libvirt.h> > >int main(void) { > int ret; > int num_doms; > char **dom; > int i; > virConnectPtr con = NULL; > > con = virConnectOpenReadOnly("xen:///"); > if (con == NULL) { > fprintf(stderr, "virConnectOpenReadOnly failed\n"); > exit(1); > } > > num_doms = virConnectNumOfDefinedDomains(con); > printf("virConnectNumOfDefinedDomains ret %d\n", num_doms); > if (num_doms < 1) { > virConnectClose(con); > exit(0); > } > > dom = calloc(num_doms, sizeof(char *)); > if (!dom) { > fprintf(stderr, "OOM\n"); > virConnectClose(con); > exit(1); > } > ret = virConnectListDefinedDomains(con, dom, num_doms); > printf("virConnectListDefinedDomains ret %d\n", ret); > > for (i = 0 ; i < num_doms ; i++) { > if (dom[i] != NULL) > printf("%d -> %s\n", i, dom[i]); > else > printf("%d is NULL\n", i); > free(dom[i]); > } > free(dom); > virConnectClose(con); > exit(0); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 437216
: 297859