mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
examples: Add all the C examples to the guestfs-examples(3) man page.
This commit is contained in:
@@ -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 $@
|
||||
|
||||
@@ -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<guestfs(3)>.
|
||||
|
||||
=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<libguestfs inspection|guestfs(3)/INSPECTION>,
|
||||
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<rjones at redhat dot com>)
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (C) 2010-2012 Red Hat Inc.
|
||||
Copyright (C) 2010-2013 Red Hat Inc.
|
||||
|
||||
Reference in New Issue
Block a user