Commit Graph

3 Commits

Author SHA1 Message Date
Daniel P. Berrange
0902f696a9 Update hellolibvirt to demo virGetLastErrorMessage()
Update the hellolibvirt example program to demonstrate use of
the virGetLastErrorMessage() API for quick error reporting

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-05-10 19:57:18 +01:00
John Ferlan
b421c35c98 hellolibvirt: Adjust code to use new APIs
Change the order of some conditions and use the AllDomains API to get
a list of all the active and defined domains, then use the Active and
Name API's in order to print.

This changes here adjust the output from:

Attempting to connect to hypervisor
Connected to hypervisor at "qemu:///system"
Hypervisor: "QEMU" version: 0.32.656
There are 0 active and 2 inactive domains
Inactive domains:
  foo
  bar
Disconnected from hypervisor

to

Attempting to connect to hypervisor
Connected to hypervisor at "qemu:///system"
Hypervisor: "QEMU" version: 0.32.656
There are 0 active and 2 inactive domains
       foo (non-active)
       bar (non-active)
Disconnected from hypervisor
2013-03-04 17:36:03 -05:00
Daniel Veillard
66780313c2 New example program
* Makefile.am configure.in examples/hellolibvirt/Makefile.am
  examples/hellolibvirt/hellolibvirt.c: new trivial example program
  by David Allan
Daniel
2009-02-26 16:14:50 +00:00