From 0e79b9dd038b83ebe5d6f2bc1d93379a2e5c7cd7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 11 Feb 2013 21:44:39 +0000 Subject: [PATCH] examples: Add all the C examples to the guestfs-examples(3) man page. --- examples/Makefile.am | 11 ++++++++--- examples/guestfs-examples.pod | 35 ++++++++++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/examples/Makefile.am b/examples/Makefile.am index 927ca1aa6..5d3a69433 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,5 +1,5 @@ # libguestfs C examples -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2013 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -147,8 +147,13 @@ stamp-guestfs-examples.pod: guestfs-examples.pod create_disk.c inspect_vm.c --section 3 \ --man guestfs-examples.3 \ --html $(top_builddir)/html/guestfs-examples.3.html \ - --verbatim $(srcdir)/create_disk.c:@EXAMPLE1@ \ - --verbatim $(srcdir)/inspect_vm.c:@EXAMPLE2@ \ + --verbatim $(srcdir)/copy_over.c:@COPY_OVER@ \ + --verbatim $(srcdir)/create_disk.c:@CREATE_DISK@ \ + --verbatim $(srcdir)/display_icon.c:@DISPLAY_ICON@ \ + --verbatim $(srcdir)/inspect_vm.c:@INSPECT_VM@ \ + --verbatim $(srcdir)/libvirt_auth.c:@LIBVIRT_AUTH@ \ + --verbatim $(srcdir)/mount_local.c:@MOUNT_LOCAL@ \ + --verbatim $(srcdir)/virt-dhcp-address.c:@VIRT_DHCP_ADDRESS@ \ --license examples \ $< touch $@ diff --git a/examples/guestfs-examples.pod b/examples/guestfs-examples.pod index aba7caa9b..05eee75a9 100644 --- a/examples/guestfs-examples.pod +++ b/examples/guestfs-examples.pod @@ -22,13 +22,38 @@ This manual page contains examples of calling libguestfs from the C programming language. If you are not familiar with using libguestfs, you also need to read L. -=head1 EXAMPLE 1: CREATE A DISK IMAGE +=head1 EXAMPLE: CREATE A DISK IMAGE -@EXAMPLE1@ +@CREATE_DISK@ -=head1 EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE +=head1 EXAMPLE: INSPECT A VIRTUAL MACHINE DISK IMAGE -@EXAMPLE2@ +@INSPECT_VM@ + +=head1 EXAMPLE: DISPLAY THE OPERATING SYSTEM ICON OF A GUEST + +This example inspects a guest using +L, +and if possible displays a representative icon or logo for the guest's +operating system. + +@DISPLAY_ICON@ + +=head1 EXAMPLE: THE LIBVIRT AUTHENTICATION API + +@LIBVIRT_AUTH@ + +=head1 EXAMPLE: THE MOUNT LOCAL API + +@MOUNT_LOCAL@ + +=head1 EXAMPLE: MULTIPLE HANDLES AND THREADS + +@COPY_OVER@ + +=head1 EXAMPLE: FETCH DHCP ADDRESS FROM A GUEST + +@VIRT_DHCP_ADDRESS@ =head1 SEE ALSO @@ -49,4 +74,4 @@ Richard W.M. Jones (C) =head1 COPYRIGHT -Copyright (C) 2010-2012 Red Hat Inc. +Copyright (C) 2010-2013 Red Hat Inc.