diff options
-rw-r--r-- | daemon/ntfs.c | 23 | ||||
-rwxr-xr-x | src/generator.ml | 8 |
2 files changed, 31 insertions, 0 deletions
diff --git a/daemon/ntfs.c b/daemon/ntfs.c index 73ccbbcd..8938dbde 100644 --- a/daemon/ntfs.c +++ b/daemon/ntfs.c @@ -35,6 +35,13 @@ optgroup_ntfs3g_available (void) } int +optgroup_ntfsprogs_available (void) +{ + int r = access ("/usr/sbin/ntfsresize", X_OK); + return r == 0; +} + +int do_ntfs_3g_probe (int rw, const char *device) { char *err; @@ -52,3 +59,19 @@ do_ntfs_3g_probe (int rw, const char *device) return r; } + +int +do_ntfsresize (const char *device) +{ + char *err; + int r; + + r = command (NULL, &err, "ntfsresize", "-P", device, NULL); + if (r == -1) { + reply_with_error ("%s: %s", device, err); + free (err); + return -1; + } + + return 0; +} diff --git a/src/generator.ml b/src/generator.ml index 9d190977..24b9bc0b 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -4373,6 +4373,14 @@ I<xz compressed> tar file) into C<directory>."); This command packs the contents of C<directory> and downloads it to local file C<tarball> (as an xz compressed tar archive)."); + ("ntfsresize", (RErr, [Device "device"]), 231, [Optional "ntfsprogs"], + [], + "resize an NTFS filesystem", + "\ +This command resizes an NTFS filesystem, expanding or +shrinking it to the size of the underlying device. +See also L<ntfsresize(8)>."); + ] let all_functions = non_daemon_functions @ daemon_functions |