X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fguestfs.pod;h=de05b55fb181b5056f6239e4c616d3ee0278a2a1;hb=72f4b2e7493bf81b111ecd83490c9d3ad2480382;hp=93f31e610fd541ede979591390072e6c8b877a62;hpb=d2400da92e5e2cc7fd5e33e61220a33214d5241c;p=libguestfs.git diff --git a/src/guestfs.pod b/src/guestfs.pod index 93f31e6..de05b55 100644 --- a/src/guestfs.pod +++ b/src/guestfs.pod @@ -162,27 +162,33 @@ NAMING> below. Before you can read or write files, create directories and so on in a disk image that contains filesystems, you have to mount those -filesystems using L. If you already know that a disk -image contains (for example) one partition with a filesystem on that -partition, then you can mount it directly: +filesystems using L or L. +If you already know that a disk image contains (for example) one +partition with a filesystem on that partition, then you can mount it +directly: - guestfs_mount (g, "/dev/sda1", "/"); + guestfs_mount_options (g, "", "/dev/sda1", "/"); where C means literally the first partition (C<1>) of the first disk image that we added (C). If the disk contains -Linux LVM2 logical volumes you could refer to those instead (eg. C). +Linux LVM2 logical volumes you could refer to those instead +(eg. C). Note that these are libguestfs virtual devices, +and are nothing to do with host devices. If you are given a disk image and you don't know what it contains then you have to find out. Libguestfs can do that too: use L and L to list possible partitions and LVs, and either try mounting each to see what is mountable, or else examine them with L or -L. Libguestfs also has a set of APIs for inspection of -disk images (see L below). But you might find it easier -to look at higher level programs built on top of libguestfs, in +L. To list just filesystems, use +L. + +Libguestfs also has a set of APIs for inspection of unknown disk +images (see L below). But you might find it easier to +look at higher level programs built on top of libguestfs, in particular L. -To mount a disk image read-only, use L. There are +To mount a filesystem read-only, use L. There are several other variations of the C call. =head2 FILESYSTEM ACCESS AND MODIFICATION @@ -256,10 +262,9 @@ L. =head2 DOWNLOADING -Use L to download small, text only files. This call -is limited to files which are less than 2 MB and which cannot contain -any ASCII NUL (C<\0>) characters. However it has a very simple -to use API. +Use L to download small, text only files. This call is +limited to files which are less than 2 MB and which cannot contain any +ASCII NUL (C<\0>) characters. However the API is very simple to use. L can be used to read files which contain arbitrary 8 bit data, since it returns a (pointer, size) pair. @@ -347,13 +352,13 @@ descriptor N. For example, L writes its output to stdout by doing: - guestfs_download (filename, "/dev/stdout"); + guestfs_download (g, filename, "/dev/stdout"); and you can write tar output to a pipe C by doing: char devfd[64]; snprintf (devfd, sizeof devfd, "/dev/fd/%d", fd); - guestfs_tar_out ("/", devfd); + guestfs_tar_out (g, "/", devfd); =head2 LISTING FILES @@ -670,9 +675,9 @@ Although we don't want to discourage you from using the C API, we will mention here that the same API is also available in other languages. The API is broadly identical in all supported languages. This means -that the C call C is -C<$g-Emount($path)> in Perl, C in Python, -and C in OCaml. In other words, a +that the C call C is +C<$g-Eadd_drive_ro($file)> in Perl, C in Python, +and C in OCaml. In other words, a straightforward, predictable isomorphism between each language. Error messages are automatically transformed @@ -708,11 +713,11 @@ with libguestfs. =item B -For documentation see L. +See L. =item B -For documentation see L. +See L. =item B @@ -723,15 +728,15 @@ The PHP binding only works correctly on 64 bit machines. =item B -For documentation see L. +See L. =item B -For documentation see L. +See L. =item B -For documentation see L. +See L. =back