5 guestfs-examples - Examples of using libguestfs from C
11 guestfs_h *g = guestfs_create ();
12 guestfs_add_drive_ro (g, "disk.img");
15 cc prog.c -o prog -lguestfs
17 cc prog.c -o prog `pkg-config libguestfs --cflags --libs`
21 This manual page contains examples of calling libguestfs from
22 the C programming language. If you are not familiar with using
23 libguestfs, you also need to read L<guestfs(3)>.
25 =head1 EXAMPLE 1: CREATE A DISK IMAGE
29 =head1 EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE
40 L<http://libguestfs.org/>,
41 L<http://caml.inria.fr/>.
45 Richard W.M. Jones (C<rjones at redhat dot com>)
49 Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>
51 The examples in this manual page may be freely copied, modified and
52 distributed without any restrictions.
54 This library is free software; you can redistribute it and/or
55 modify it under the terms of the GNU Lesser General Public
56 License as published by the Free Software Foundation; either
57 version 2 of the License, or (at your option) any later version.
59 This library is distributed in the hope that it will be useful,
60 but WITHOUT ANY WARRANTY; without even the implied warranty of
61 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
62 Lesser General Public License for more details.
64 You should have received a copy of the GNU Lesser General Public
65 License along with this library; if not, write to the Free Software
66 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA