From 3de234656bc61a2d35b0f1a9ccb1e6ef7535166b Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Mon, 8 Jun 2009 17:44:14 +0100 Subject: Add 'ntfs_3g_probe' command so we can probe the "mountability" of an NTFS partition. --- src/generator.ml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src') diff --git a/src/generator.ml b/src/generator.ml index ffee564e..2113bc43 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -2318,6 +2318,29 @@ This command is only needed because of C "\ Sleep for C seconds."); + ("ntfs_3g_probe", (RInt "status", [Bool "rw"; String "device"]), 110, [], + [InitNone, Always, TestOutputInt ( + [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ","]; + ["mkfs"; "ntfs"; "/dev/sda1"]; + ["ntfs_3g_probe"; "true"; "/dev/sda1"]], 0); + InitNone, Always, TestOutputInt ( + [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ","]; + ["mkfs"; "ext2"; "/dev/sda1"]; + ["ntfs_3g_probe"; "true"; "/dev/sda1"]], 12)], + "probe NTFS volume", + "\ +This command runs the L command which probes +an NTFS C for mountability. (Not all NTFS volumes can +be mounted read-write, and some cannot be mounted at all). + +C is a boolean flag. Set it to true if you want to test +if the volume can be mounted read-write. Set it to false if +you want to test if the volume can be mounted read-only. + +The return value is an integer which C<0> if the operation +would succeed, or some non-zero value documented in the +L manual page."); + ] let all_functions = non_daemon_functions @ daemon_functions -- cgit