summaryrefslogtreecommitdiffstats
path: root/examples/virt-dhcp-address.c
Commit message (Collapse)AuthorAgeFilesLines
* Check return values of guestfs_inspect_get_{type,distro} (found by Coverity).Richard W.M. Jones2012-03-081-0/+4
| | | | | | | | | | Error: NULL_RETURNS: /builddir/build/BUILD/libguestfs-1.16.5/examples/virt-dhcp-address.c:129: var_assigned: Assigning: "guest_distro" = null return value from "guestfs_inspect_get_distro". /builddir/build/BUILD/libguestfs-1.16.5/examples/virt-dhcp-address.c:131: dereference: Dereferencing a pointer that might be null "guest_distro" when calling "__coverity_strcmp". [...] /builddir/build/BUILD/libguestfs-1.16.5/examples/virt-dhcp-address.c:126: var_assigned: Assigning: "guest_type" = null return value from "guestfs_inspect_get_type". /builddir/build/BUILD/libguestfs-1.16.5/examples/virt-dhcp-address.c:128: dereference: Dereferencing a pointer that might be null "guest_type" when calling "__coverity_strcmp". (cherry picked from commit 618954a6b0adc3e0eacda799b88f020c801a0106)
* New API: inspect-get-windows-current-control-setRichard W.M. Jones2011-04-051-23/+8
| | | | | | | | | | | | | | This returns the actual registry key corresponding to CurrentControlSet (eg. it might be "ControlSet001"). Previously the inspection code was hard-coding ControlSet001. Now we use the correct control set, and also make it available to callers through the API. This commit also updates the virt-dhcp-address example so it uses this new API. virt-inspector displays the current control set when available.
* examples: Add virt-dhcp-address program.Richard W.M. Jones2011-03-311-0/+342
This is like the mythical 'virt-ifconfig'. There is not enough certainty around the right way to be doing this for us to make a full virt tool for this. Therefore the code is just an example.