summaryrefslogtreecommitdiffstats
path: root/perl
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-07-29 10:15:06 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-07-29 10:16:05 +0100
commit7cbd1bbdd5e613561ea7227081f7ddd666b98ee0 (patch)
tree582f2142e539661febc6c9809a89c0e74e41cfba /perl
parent4ce1433497e625b4060add414c1d0bc7a9a30392 (diff)
downloadlibguestfs-7cbd1bbdd5e613561ea7227081f7ddd666b98ee0.tar.gz
libguestfs-7cbd1bbdd5e613561ea7227081f7ddd666b98ee0.tar.xz
libguestfs-7cbd1bbdd5e613561ea7227081f7ddd666b98ee0.zip
Lib: Document the $ro parameter for mount_operating_system properly.
Diffstat (limited to 'perl')
-rw-r--r--perl/lib/Sys/Guestfs/Lib.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm
index 4020c244..bc8be9db 100644
--- a/perl/lib/Sys/Guestfs/Lib.pm
+++ b/perl/lib/Sys/Guestfs/Lib.pm
@@ -1049,13 +1049,14 @@ sub _find_filesystem
=head2 mount_operating_system
- mount_operating_system ($g, \%os);
+ mount_operating_system ($g, \%os, [$ro]);
This function mounts the operating system described in the
C<%os> hash according to the C<mounts> table in that hash (see
C<inspect_operating_systems>).
-The partitions are mounted read-only.
+The partitions are mounted read-only unless the third parameter
+is specified as zero explicitly.
To reverse the effect of this call, use the standard
libguestfs API call C<$g-E<gt>umount_all ()>.
@@ -1067,9 +1068,9 @@ sub mount_operating_system
local $_;
my $g = shift;
my $os = shift;
- my $ro = shift; # Read-only?
+ my $ro = shift; # Read-only?
- $ro = 1 unless(defined($ro)); # ro defaults to 1 if unspecified
+ $ro = 1 unless defined $ro; # ro defaults to 1 if unspecified
my $mounts = $os->{mounts};