summaryrefslogtreecommitdiffstats
path: root/perl
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-22 21:02:49 +0100
committerRichard Jones <rjones@redhat.com>2009-04-22 21:02:49 +0100
commit79cdf81e2fb717ea4372a55170d16800cdbddf23 (patch)
tree42b91b69ef02a17c49de10944d249526d63698f6 /perl
parentd7ffe439e8ec5304a1a2d1eb591d348c4ab84f38 (diff)
downloadlibguestfs-79cdf81e2fb717ea4372a55170d16800cdbddf23.tar.gz
libguestfs-79cdf81e2fb717ea4372a55170d16800cdbddf23.tar.xz
libguestfs-79cdf81e2fb717ea4372a55170d16800cdbddf23.zip
Generated code for new mount_* commands.
Diffstat (limited to 'perl')
-rw-r--r--perl/Guestfs.xs39
-rw-r--r--perl/lib/Sys/Guestfs.pm17
2 files changed, 56 insertions, 0 deletions
diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs
index 657a0ba1..fe2c81c9 100644
--- a/perl/Guestfs.xs
+++ b/perl/Guestfs.xs
@@ -1429,3 +1429,42 @@ PREINIT:
if (r == -1)
croak ("tgz_out: %s", guestfs_last_error (g));
+void
+mount_ro (g, device, mountpoint)
+ guestfs_h *g;
+ char *device;
+ char *mountpoint;
+PREINIT:
+ int r;
+ PPCODE:
+ r = guestfs_mount_ro (g, device, mountpoint);
+ if (r == -1)
+ croak ("mount_ro: %s", guestfs_last_error (g));
+
+void
+mount_options (g, options, device, mountpoint)
+ guestfs_h *g;
+ char *options;
+ char *device;
+ char *mountpoint;
+PREINIT:
+ int r;
+ PPCODE:
+ r = guestfs_mount_options (g, options, device, mountpoint);
+ if (r == -1)
+ croak ("mount_options: %s", guestfs_last_error (g));
+
+void
+mount_vfs (g, options, vfstype, device, mountpoint)
+ guestfs_h *g;
+ char *options;
+ char *vfstype;
+ char *device;
+ char *mountpoint;
+PREINIT:
+ int r;
+ PPCODE:
+ r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
+ if (r == -1)
+ croak ("mount_vfs: %s", guestfs_last_error (g));
+
diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm
index 273e4fe1..ea826592 100644
--- a/perl/lib/Sys/Guestfs.pm
+++ b/perl/lib/Sys/Guestfs.pm
@@ -647,6 +647,23 @@ on the underlying device.
The filesystem options C<sync> and C<noatime> are set with this
call, in order to improve reliability.
+=item $h->mount_options ($options, $device, $mountpoint);
+
+This is the same as the C<$h-E<gt>mount> command, but it
+allows you to set the mount options as for the
+L<mount(8)> I<-o> flag.
+
+=item $h->mount_ro ($device, $mountpoint);
+
+This is the same as the C<$h-E<gt>mount> command, but it
+mounts the filesystem with the read-only (I<-o ro>) flag.
+
+=item $h->mount_vfs ($options, $vfstype, $device, $mountpoint);
+
+This is the same as the C<$h-E<gt>mount> command, but it
+allows you to set both the mount options and the vfstype
+as for the L<mount(8)> I<-o> and I<-t> flags.
+
=item @devices = $h->mounts ();
This returns the list of currently mounted filesystems. It returns