diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-22 21:02:15 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-22 21:02:15 +0100 |
commit | d7ffe439e8ec5304a1a2d1eb591d348c4ab84f38 (patch) | |
tree | 9f285f3bd411265f7b1cbb975004efe254114ab9 /src | |
parent | 35dc2f5706a957fe9a17d4bc29ad433c541d2fa0 (diff) | |
download | libguestfs-d7ffe439e8ec5304a1a2d1eb591d348c4ab84f38.tar.gz libguestfs-d7ffe439e8ec5304a1a2d1eb591d348c4ab84f38.tar.xz libguestfs-d7ffe439e8ec5304a1a2d1eb591d348c4ab84f38.zip |
Add mount_ro, mount_options, mount_vfs. Fix small bug in OCaml generator.
Diffstat (limited to 'src')
-rwxr-xr-x | src/generator.ml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/generator.ml b/src/generator.ml index 23738bd9..7e7976c8 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -1435,6 +1435,37 @@ it to local file C<tarball>. To download an uncompressed tarball, use C<guestfs_tar_out>."); + ("mount_ro", (RErr, [String "device"; String "mountpoint"]), 73, [], + [InitBasicFS, TestLastFail ( + [["umount"; "/"]; + ["mount_ro"; "/dev/sda1"; "/"]; + ["touch"; "/new"]]); + InitBasicFS, TestOutput ( + [["write_file"; "/new"; "data"; "0"]; + ["umount"; "/"]; + ["mount_ro"; "/dev/sda1"; "/"]; + ["cat"; "/new"]], "data")], + "mount a guest disk, read-only", + "\ +This is the same as the C<guestfs_mount> command, but it +mounts the filesystem with the read-only (I<-o ro>) flag."); + + ("mount_options", (RErr, [String "options"; String "device"; String "mountpoint"]), 74, [], + [], + "mount a guest disk with mount options", + "\ +This is the same as the C<guestfs_mount> command, but it +allows you to set the mount options as for the +L<mount(8)> I<-o> flag."); + + ("mount_vfs", (RErr, [String "options"; String "vfstype"; String "device"; String "mountpoint"]), 75, [], + [], + "mount a guest disk with mount options and vfstype", + "\ +This is the same as the C<guestfs_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."); + ] let all_functions = non_daemon_functions @ daemon_functions @@ -4106,6 +4137,8 @@ copy_table (char * const * argv) pr "{\n"; (match params with + | [p1; p2; p3; p4; p5] -> + pr " CAMLparam5 (%s);\n" (String.concat ", " params) | p1 :: p2 :: p3 :: p4 :: p5 :: rest -> pr " CAMLparam5 (%s);\n" (String.concat ", " [p1; p2; p3; p4; p5]); pr " CAMLxparam%d (%s);\n" |